Fix for #82509, lack of failure notification for ALL_WINDOWS
authorbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 6 Jun 2002 14:03:46 +0000 (14:03 +0000)
committerbillh <billh@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Thu, 6 Jun 2002 14:03:46 +0000 (14:03 +0000)
keylistener registration if listener cannot be registered.

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

ChangeLog
registryd/deviceeventcontroller.c

index f6fa3c2..48db1cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-06-06  Bill Haneman  <bill.haneman@sun.com>
+
+       * registryd/deviceeventcontroller.c:
+        (spi_controller_update_key_grabs):
+       Fix for #82509, lack of failure notification when
+        ALL_WINDOWS keygrabs fail due to XGrabKey
+        failure: we synchronize the server when 
+        registering a passive grab, to make sure we get the
+        error message before the call returns.
+
 2002-06-03  Bill Haneman  <bill.haneman@sun.com>
 
        * test/test-simple.c:
index f023f4e..df45578 100644 (file)
@@ -736,6 +736,7 @@ spi_controller_update_key_grabs (SpiDEController           *controller,
 #ifdef SPI_DEBUG
          fprintf (stderr, "grab with mask %x\n", grab_mask->mod_mask);
 #endif
+         XSynchronize (spi_get_display(), True);
           XGrabKey (spi_get_display (),
                    grab_mask->key_val,
                    grab_mask->mod_mask,
@@ -743,7 +744,7 @@ spi_controller_update_key_grabs (SpiDEController           *controller,
                    True,
                    GrabModeAsync,
                    GrabModeAsync);
-       /* TODO: set retval to FALSE if an X error occurrs here */
+         XSynchronize (spi_get_display(), False);
        }
 
       grab_mask->pending_add = FALSE;
@@ -759,7 +760,6 @@ spi_controller_update_key_grabs (SpiDEController           *controller,
          spi_grab_mask_free (grab_mask);
        }
 
-      /* TODO: check calls for errors and return FALSE if error occurs */
     } 
 
   return ! spi_clear_error_state ();