r15963 - in /desktop/unstable/pygtk/debian: changelog patches/60_pygtk-wakeupfd-fix.patch
lool at users.alioth.debian.org
lool at users.alioth.debian.org
Thu May 15 13:30:12 UTC 2008
Author: lool
Date: Thu May 15 13:30:12 2008
New Revision: 15963
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=15963
Log:
* New patch, 61_pygtk-wakeupfd-fix, similar to the fix to the initial
SETWAKEUPFD support in GNOME #481569.
Added:
desktop/unstable/pygtk/debian/patches/60_pygtk-wakeupfd-fix.patch
Modified:
desktop/unstable/pygtk/debian/changelog
Modified: desktop/unstable/pygtk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pygtk/debian/changelog?rev=15963&op=diff
==============================================================================
--- desktop/unstable/pygtk/debian/changelog (original)
+++ desktop/unstable/pygtk/debian/changelog Thu May 15 13:30:12 2008
@@ -1,3 +1,10 @@
+pygtk (2.12.1-2) unstable; urgency=low
+
+ * New patch, 61_pygtk-wakeupfd-fix, similar to the fix to the initial
+ SETWAKEUPFD support in GNOME #481569.
+
+ -- Loic Minier <lool at dooz.org> Thu, 15 May 2008 15:28:29 +0200
+
pygtk (2.12.1-1) unstable; urgency=low
* New upstream release.
Added: desktop/unstable/pygtk/debian/patches/60_pygtk-wakeupfd-fix.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/pygtk/debian/patches/60_pygtk-wakeupfd-fix.patch?rev=15963&op=file
==============================================================================
--- desktop/unstable/pygtk/debian/patches/60_pygtk-wakeupfd-fix.patch (added)
+++ desktop/unstable/pygtk/debian/patches/60_pygtk-wakeupfd-fix.patch Thu May 15 13:30:12 2008
@@ -1,0 +1,48 @@
+Similar to the fix to the initial SETWAKEUPFD support in GNOME #481569.
+
+--- pygtk-2.12.1/gtk/gtk.override 2008-01-03 12:01:58.000000000 +0100
++++ pygtk-2.12.1.new/gtk/gtk.override 2008-05-15 15:29:49.000000000 +0200
+@@ -25,6 +25,7 @@
+ #include "pygobject.h"
+
+ #include <locale.h>
++#include <fcntl.h>
+
+ #include <gtk/gtk.h>
+ #include <gtk/gtktreeitem.h>
+@@ -1068,7 +1069,10 @@
+ pygtk_main_watch_prepare(GSource *source,
+ int *timeout)
+ {
++ifdef HAVE_PYSIGNAL_SETWAKEUPFD
+ PySignalWatchSource *real_source = (PySignalWatchSource *)source;
++ int flag;
++#endif
+
+ /* Python only invokes signal handlers from the main thread,
+ * so if a thread other than the main thread receives the signal
+@@ -1102,6 +1106,11 @@
+ real_source->fd.events = G_IO_IN | G_IO_HUP | G_IO_ERR;
+ g_source_add_poll(source, &real_source->fd);
+
++ /* Make the read end of the fd non blocking */
++ flag = fcntl(real_source->fds[0], F_GETFL, 0);
++ flag |= O_NONBLOCK;
++ fcntl(real_source->fds[0], F_SETFL, flag);
++
+ PySignal_SetWakeupFd(real_source->fds[1]);
+
+ #else /* !HAVE_PYSIGNAL_SETWAKEUPFD */
+@@ -1121,8 +1130,12 @@
+ {
+ PyGILState_STATE state;
+
++ PySignalWatchSource *real_source = (PySignalWatchSource *)source;
++ char buf[1];
++
+ state = pyg_gil_state_ensure();
+
++ read(real_source->fds[0], &buf, 1);
+ if (PyErr_CheckSignals() == -1 && gtk_main_level() > 0) {
+ PyErr_SetNone(PyExc_KeyboardInterrupt);
+ gtk_main_quit();
More information about the pkg-gnome-commits
mailing list