From 2af788956e216f77ab4ccc842c3795d4f517b0e4 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 25 Sep 2009 12:58:01 -0400 Subject: [PATCH] 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 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c index 37bb24ce9..a84943da0 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;