c4f3522
Index: gsd-mouse-manager.c
c4f3522
===================================================================
c4f3522
--- gsd-mouse-manager.c	(revision 234)
c4f3522
+++ gsd-mouse-manager.c	(working copy)
c4f3522
@@ -424,21 +424,19 @@
c4f3522
                                                      NULL, NULL, NULL);
c4f3522
                 if (keyval == GDK_Control_L || keyval == GDK_Control_R) {
c4f3522
                         if (xev->type == KeyPress) {
c4f3522
-                                XAllowEvents (gdk_x11_get_default_xdisplay (),
c4f3522
+                                XAllowEvents (xev->xkey.display,
c4f3522
                                               SyncKeyboard,
c4f3522
                                               xev->xkey.time);
c4f3522
                         } else {
c4f3522
-                                XAllowEvents (gdk_x11_get_default_xdisplay (),
c4f3522
+                                XAllowEvents (xev->xkey.display,
c4f3522
                                               AsyncKeyboard,
c4f3522
                                               xev->xkey.time);
c4f3522
                                 gsd_locate_pointer (screen);
c4f3522
                         }
c4f3522
                 } else {
c4f3522
-                        XAllowEvents (gdk_x11_get_default_xdisplay (),
c4f3522
+                        XAllowEvents (xev->xkey.display,
c4f3522
                                       ReplayKeyboard,
c4f3522
                                       xev->xkey.time);
c4f3522
-                        XUngrabKeyboard (gdk_x11_get_default_xdisplay (),
c4f3522
-                                         xev->xkey.time);
c4f3522
                 }
c4f3522
         }
c4f3522
         return GDK_FILTER_CONTINUE;