[gtk+] Do not modify associated device for non-master devices on dispose
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Do not modify associated device for non-master devices on dispose
- Date: Mon, 24 Jan 2011 19:13:48 +0000 (UTC)
commit 8fdd8dbc3517b8b002714a2bfa19b2b060da3d05
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 24 19:55:41 2011 +0100
Do not modify associated device for non-master devices on dispose
Only master devices must modify the associated device to separate
a pointer/keyboard pair, slave devices must only call
_gdk_device_remove_slave().
Fixes bug 639767 - password not accepted in gnome-screensaver dialog,
reported by Frederic Crozat. On VT-switch, the X server removes its
grab on HW devices, the effect on clients is that slave devices
disappear, and these were mistakenly mangling the master device
hierarchy. so gdk_device_get_associated_device() on the client
pointer wouldn't return the paired keyboard anymore.
The final effect is that gtkplug-x11 wasn't setting a keyboard to
its generated events.
gdk/gdkdevice.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index 373dc57..2cc3ea8 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -273,7 +273,9 @@ gdk_device_dispose (GObject *object)
if (device->associated)
{
- _gdk_device_set_associated_device (device->associated, NULL);
+ if (device->type == GDK_DEVICE_TYPE_MASTER)
+ _gdk_device_set_associated_device (device->associated, NULL);
+
g_object_unref (device->associated);
device->associated = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]