[maemo-commits] [maemo-commits] r12460 - in projects/haf/trunk/clipboard-manager: . debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jun 26 13:24:41 EEST 2007
Author: jobi
Date: 2007-06-26 13:24:29 +0300 (Tue, 26 Jun 2007)
New Revision: 12460

Modified:
   projects/haf/trunk/clipboard-manager/debian/changelog
   projects/haf/trunk/clipboard-manager/manager.c
Log:

clipboard-manager (0.6.6-1) sardine; urgency=low

  * Add the X connection to the list of fds to poll. Fixes: NB#61616

 -- Johan Bilien <johan.bilien at nokia.com>  Tue, 26 Jun 2007 13:22:57 +0300



Modified: projects/haf/trunk/clipboard-manager/debian/changelog
===================================================================
--- projects/haf/trunk/clipboard-manager/debian/changelog	2007-06-26 09:11:18 UTC (rev 12459)
+++ projects/haf/trunk/clipboard-manager/debian/changelog	2007-06-26 10:24:29 UTC (rev 12460)
@@ -1,3 +1,9 @@
+clipboard-manager (0.6.6-1) sardine; urgency=low
+
+  * Add the X connection to the list of fds to poll. Fixes: NB#61616
+
+ -- Johan Bilien <johan.bilien at nokia.com>  Tue, 26 Jun 2007 13:22:57 +0300
+
 clipboard-manager (0.6.5-3) sardine; urgency=low
 
   * Added default gconf2xsettings keys file

Modified: projects/haf/trunk/clipboard-manager/manager.c
===================================================================
--- projects/haf/trunk/clipboard-manager/manager.c	2007-06-26 09:11:18 UTC (rev 12459)
+++ projects/haf/trunk/clipboard-manager/manager.c	2007-06-26 10:24:29 UTC (rev 12460)
@@ -35,6 +35,7 @@
   {
   GSource source ;
   Display *display ;
+  GPollFD event_poll_fd ;
   } X11EventSource ;
 
 void
@@ -80,7 +81,9 @@
 
 static gboolean x11_event_check (GSource *source)
   {
-  return XPending (((X11EventSource *)source)->display) ;
+  X11EventSource *x11_event_source = (X11EventSource *)source ;
+  return (x11_event_source->event_poll_fd.revents & G_IO_IN) ||
+          XPending (x11_event_source->display) ;
   }
 
 static gboolean x11_event_dispatch (GSource *source, GSourceFunc callback, gpointer user_data)
@@ -103,6 +106,9 @@
   {
   X11EventSource *x11_event_source = (X11EventSource *)g_source_new (&source_funcs, sizeof (X11EventSource)) ;
   x11_event_source->display = display ;
+  x11_event_source->event_poll_fd.fd = ConnectionNumber (display) ;
+  x11_event_source->event_poll_fd.events = G_IO_IN ;
+  g_source_add_poll ((GSource *)x11_event_source, &x11_event_source->event_poll_fd) ;
 
   g_print ("x11_event_source_new: Returning 0x%x\n", (int)x11_event_source) ;
 


More information about the maemo-commits mailing list