[immodule-qt] Re: [SCIM] scim-qtimm 0.7 released
LiuCougar
liucougar at gmail.com
Mon Sep 6 04:05:37 EEST 2004
On Sun, 5 Sep 2004 23:27:35 +0900, Daisuke Kameda <kaminmat at cc.rim.or.jp> wrote:
> > I changed one function in kernel/qapplication_x11.cpp to overcome this
> > issue:
> >
> > void QApplication::postIMEvent( QObject *receiver, QIMEvent *event )
> > {
> > if( event->type() == QEvent::IMCompose )
> > postEvent( receiver, event );
> > else {
> > sendEvent( receiver, event );
> > delete event;
> > }
> > }
> >
> > (With this modification, the input "To^i te^n la` Dda vi.t." will
> > generate the correctly output.)
>
> This change is good. And, I also think there is no other solution
> about this problem.
I updated this patch:
void QApplication::postIMEvent( QObject *receiver, QIMEvent *event )
{
if( event->type() == QEvent::IMCompose )
postEvent( receiver, event );
else {
QPostEventList * l = receiver->postedEvents;
//get rid of IMCompose event posted before
if ( event->type() == QEvent::IMCompose ) {
l->first();
QPostEvent * cur = 0;
for ( ;; ) {
while ( (cur=l->current()) != 0 &&
( cur->receiver != receiver ||
cur->event == 0 ||
cur->event->type() != event->type() ) )
l->next();
if ( l->current() != 0 ) {
if ( cur->event->type() == QEvent::IMCompose ) {
delete cur->event;
l->remove(cur);
}
}
}
}
sendEvent( receiver, event );
delete event;
}
}
and move this function from src/kernel/qapplication_x11.cpp to
src/kernel/qapplication.cpp : first, this function does not use any
x11 specific apis, second, QPostEventList is only available in
qapplication.cpp.
What is added: if a IMStart/IMEnd event is sent, remove the pending
IMCompose event in the queue.
Please check it.
BTW: when will our svn come back to normal please?
Regards,
--
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage
More information about the immodule-qt
mailing list