rpms/perl-Tk/devel perl-Tk-XIM.patch, NONE, 1.1 perl-Tk.spec, 1.16, 1.17

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Author: kasal

Update of /cvs/extras/rpms/perl-Tk/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27274

Modified Files:
	perl-Tk.spec 
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 */


Index: perl-Tk.spec
===================================================================
RCS file: /cvs/extras/rpms/perl-Tk/devel/perl-Tk.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- perl-Tk.spec	27 Feb 2009 03:52:49 -0000	1.16
+++ perl-Tk.spec	19 Mar 2009 14:54:33 -0000	1.17
@@ -3,7 +3,7 @@
 
 Name:           perl-Tk
 Version:        804.028
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        Perl Graphical User Interface ToolKit
 
 Group:          Development/Libraries
@@ -15,6 +15,8 @@
 Patch1:         perl-Tk-debian.patch.gz
 # fix segfaults as in #235666 because of broken cashing code
 Patch2:         perl-Tk-seg.patch
+# fix interaction with XIM, bug #489228, upstream change r12589
+Patch3:		perl-Tk-XIM.patch
 
 # fix gif overflow in tk see CVE-2006-4484 and CVE-2007-6697 or #431518 and
 # #431529
@@ -57,6 +59,7 @@
 %patch1 -p1
 # patch to fix #235666 ... seems like caching code is broken
 %patch2 -p1 -b .seg
+%patch3 -p1 -b .xim
 %patch100
 
 %build
@@ -102,6 +105,9 @@
 %exclude %{perl_vendorarch}/Tk/reindex.pl
 
 %changelog
+* Thu Mar 19 2009 Stepan Kasal <skasal@xxxxxxxxxx> - 804.028-7
+- perl-Tk-XIM.patch (#489228)
+
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 804.028-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 

--
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

[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux