gnome-settings-daemon r607 - in branches/gnome-2-24: . plugins/mouse



Author: jensg
Date: Thu Nov 20 17:59:15 2008
New Revision: 607
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=607&view=rev

Log:
2008-11-20  Jens Granseuer  <jensgr gmx net>

	Merged from trunk.

	* plugins/mouse/gsd-mouse-manager.c: (set_devicepresence_handler):
	trap X errors so we don't crash on X servers that don't support
	DevicePresence (bug #560618)


Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/plugins/mouse/gsd-mouse-manager.c

Modified: branches/gnome-2-24/plugins/mouse/gsd-mouse-manager.c
==============================================================================
--- branches/gnome-2-24/plugins/mouse/gsd-mouse-manager.c	(original)
+++ branches/gnome-2-24/plugins/mouse/gsd-mouse-manager.c	Thu Nov 20 17:59:15 2008
@@ -331,11 +331,15 @@
         XEventClass class_presence;
         int xi_presence;
 
+        gdk_error_trap_push ();
         DevicePresence (display, xi_presence, class_presence);
         XSelectExtensionEvent (display,
                                RootWindow (display, DefaultScreen (display)),
                                &class_presence, 1);
-        gdk_window_add_filter (NULL, devicepresence_filter, manager);
+
+        gdk_flush ();
+        if (!gdk_error_trap_pop ())
+                gdk_window_add_filter (NULL, devicepresence_filter, manager);
 }
 #endif
 



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