Author: kasal Update of /cvs/extras/rpms/perl-Tk/F-10 In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3468 Added Files: perl-Tk-XIM.patch Log Message: - perl-Tk-XIM.patch (#489228) perl-Tk-XIM.patch: --- NEW FILE perl-Tk-XIM.patch --- 2009-03-19 Stepan Kasal <skasal@xxxxxxxxxx> Fix keyboard input with XIM, r12589 from http://svn.perl.org/modules/Tk/trunk Index: Tk/pTk/mTk/unix/tkUnixEvent.c =================================================================== --- Tk/pTk/mTk/unix/tkUnixEvent.c (revision 12588) +++ Tk/pTk/mTk/unix/tkUnixEvent.c (revision 12589) @@ -305,22 +305,26 @@ */ static void -TransferXEventsToTcl(display) - Display *display; +TransferXEventsToTcl( + Display *display) { - int numFound; XEvent event; - numFound = QLength(display); - /* - * Transfer events from the X event queue to the Tk event queue. + * Transfer events from the X event queue to the Tk event queue after XIM + * event filtering. KeyPress and KeyRelease events are filtered in + * Tk_HandleEvent instead of here, so that Tk's focus management code can + * redirect them. */ - while (numFound > 0) { + while (QLength(display) > 0) { XNextEvent(display, &event); + if (event.type != KeyPress && event.type != KeyRelease) { + if (XFilterEvent(&event, None)) { + continue; + } + } Tk_QueueWindowEvent(&event, TCL_QUEUE_TAIL); - numFound--; } } Index: Tk/pTk/mTk/generic/tkEvent.c =================================================================== --- Tk/pTk/mTk/generic/tkEvent.c (revision 12588) +++ Tk/pTk/mTk/generic/tkEvent.c (revision 12589) @@ -945,8 +945,10 @@ #endif } } - if (XFilterEvent(eventPtr, None)) { - goto done; + if (eventPtr->type == KeyPress || eventPtr->type == KeyRelease) { + if (XFilterEvent(eventPtr, None)) { + goto done; + } } } #endif /* TK_USE_INPUT_METHODS */ -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl Fedora-perl-devel-list mailing list Fedora-perl-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list