* registryd/deviceeventcontroller.c
authorpadraigo <padraigo@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 10 Oct 2002 12:43:32 +0000 (12:43 +0000)
committerpadraigo <padraigo@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 10 Oct 2002 12:43:32 +0000 (12:43 +0000)
(global_filter_fn): Correct typo which caused KeyPress and KeyRelease
events to be ignored.
(spi_controller_update_key_grabs): Use GrabModeSync for pointer_mode
keyboard_mode so that XAllowEvents() can be called.

Fixes bug #93658.

git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@351 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
registryd/deviceeventcontroller.c

index d119cff..860f6d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-10  Padraig O'Briain  <padraig.obriain@sun.com>
+
+       * registryd/deviceeventcontroller.c
+       (global_filter_fn): Correct typo which caused KeyPress and KeyRelease
+       events to be ignored.
+       (spi_controller_update_key_grabs): Use GrabModeSync for pointer_mode
+       keyboard_mode so that XAllowEvents() can be called.
+
+       Fixes bug #93658.
+
 2002-10-08  Padraig O'Briain  <padraig.obriain@sun.com>
 
        * cspi/spi-accessible.c: Correct names of roles returned by
 2002-10-08  Padraig O'Briain  <padraig.obriain@sun.com>
 
        * cspi/spi-accessible.c: Correct names of roles returned by
index 641f020..c919b42 100644 (file)
@@ -416,7 +416,7 @@ handle_keygrab (SpiDEController         *controller,
     {
       grab_mask.key_val = AnyKey;
 #ifdef SPI_DEBUG
     {
       grab_mask.key_val = AnyKey;
 #ifdef SPI_DEBUG
-      fprintf (stderr, "AnyKey grab!"); */
+      fprintf (stderr, "AnyKey grab!");
 #endif
       process_cb (controller, &grab_mask);
     }
 #endif
       process_cb (controller, &grab_mask);
     }
@@ -548,7 +548,7 @@ global_filter_fn (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
   XEvent *xevent = gdk_xevent;
   SpiDEController *controller;
 
   XEvent *xevent = gdk_xevent;
   SpiDEController *controller;
 
-  if (xevent->type == KeyPress && xevent->type == KeyRelease)
+  if (xevent->type == KeyPress || xevent->type == KeyRelease)
     {
       controller = SPI_DEVICE_EVENT_CONTROLLER (data);
       spi_device_event_controller_forward_key_event (controller, xevent);
     {
       controller = SPI_DEVICE_EVENT_CONTROLLER (data);
       spi_device_event_controller_forward_key_event (controller, xevent);
@@ -594,7 +594,6 @@ spi_controller_register_with_devices (SpiDEController *controller)
   x_default_error_handler = XSetErrorHandler (_spi_controller_device_error_handler);
 }
 
   x_default_error_handler = XSetErrorHandler (_spi_controller_device_error_handler);
 }
 
-#define SPI_KEYEVENT_DEBUG
 static gboolean
 spi_key_set_contains_key (Accessibility_KeySet            *key_set,
                          const Accessibility_DeviceEvent *key_event)
 static gboolean
 spi_key_set_contains_key (Accessibility_KeySet            *key_set,
                          const Accessibility_DeviceEvent *key_event)
@@ -973,15 +972,15 @@ spi_controller_update_key_grabs (SpiDEController           *controller,
         {
 
 #ifdef SPI_DEBUG
         {
 
 #ifdef SPI_DEBUG
-         fprintf (stderr, "grab with mask %x\n", grab_mask->mod_mask);
+         fprintf (stderr, "grab %d with mask %x\n", grab_mask->key_val, grab_mask->mod_mask);
 #endif
           XGrabKey (spi_get_display (),
                    grab_mask->key_val,
                    grab_mask->mod_mask,
                    gdk_x11_get_default_root_xwindow (),
                    True,
 #endif
           XGrabKey (spi_get_display (),
                    grab_mask->key_val,
                    grab_mask->mod_mask,
                    gdk_x11_get_default_root_xwindow (),
                    True,
-                   GrabModeAsync,
-                   GrabModeAsync);
+                   GrabModeSync,
+                   GrabModeSync);
          XSync (spi_get_display (), False);
          update_failed = spi_clear_error_state ();
          if (update_failed) {
          XSync (spi_get_display (), False);
          update_failed = spi_clear_error_state ();
          if (update_failed) {