[mutter] mutter_begin_modal_for_plugin(): Check result of XGrabKeyboard()



commit 2af788956e216f77ab4ccc842c3795d4f517b0e4
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Fri Sep 25 12:58:01 2009 -0400

    mutter_begin_modal_for_plugin(): Check result of XGrabKeyboard()
    
    The return value of XGrabKeyboard() wasn't actually being assigned
    to the 'result' variable so we didn't notice when grabbing the
    keyboard failed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=596343

 src/compositor/compositor.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index 37bb24c..a84943d 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -390,10 +390,10 @@ mutter_begin_modal_for_plugin (MetaScreen       *screen,
 
   if ((options & META_MODAL_KEYBOARD_ALREADY_GRABBED) == 0)
     {
-      XGrabKeyboard (xdpy, grab_window,
-                     False, /* owner_events */
-                     GrabModeAsync, GrabModeAsync,
-                     timestamp);
+      result = XGrabKeyboard (xdpy, grab_window,
+                              False, /* owner_events */
+                              GrabModeAsync, GrabModeAsync,
+                              timestamp);
 
       if (result != Success)
         goto fail;



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