[gtk+/xi2: 1048/1239] GdkDeviceCore: ungrab keyboard if device is keyboard.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 1048/1239] GdkDeviceCore: ungrab keyboard if device is keyboard.
- Date: Tue, 29 Sep 2009 10:55:23 +0000 (UTC)
commit ec29687d8feeb31f55f7b1270b197849d811c396
Author: Carlos Garnacho <carlos gnome org>
Date: Sat Sep 5 15:10:16 2009 +0200
GdkDeviceCore: ungrab keyboard if device is keyboard.
GdkDevice can represent both pointers and keyboards. grab() did the right
thing with the latter, so now grab() and ungrab() are in sync.
gdk/x11/gdkdevice-core.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index c5d2af0..ff4fb33 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -281,7 +281,11 @@ gdk_device_core_ungrab (GdkDevice *device,
GdkDisplay *display;
display = gdk_device_get_display (device);
- XUngrabPointer (GDK_DISPLAY_XDISPLAY (display), time_);
+
+ if (device->source == GDK_SOURCE_KEYBOARD)
+ XUngrabKeyboard (GDK_DISPLAY_XDISPLAY (display), time_);
+ else
+ XUngrabPointer (GDK_DISPLAY_XDISPLAY (display), time_);
}
static GdkWindow *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]