[gtk+/xi2: 1193/1239] GdkDeviceManagerXI2: Set !GDK_MODE_DISABLED to keyboards.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/xi2: 1193/1239] GdkDeviceManagerXI2: Set !GDK_MODE_DISABLED to keyboards.
- Date: Tue, 29 Sep 2009 10:58:14 +0000 (UTC)
commit 2807fc77866c078a4c7d4643b0886d5c0139f142
Author: Carlos Garnacho <carlos gnome org>
Date: Sat Sep 19 17:10:19 2009 +0200
GdkDeviceManagerXI2: Set !GDK_MODE_DISABLED to keyboards.
Screen/Window mode don't apply much to keyboards actually. Enabling/disabling
and coordinates mode should be separated at some point.
gdk/x11/gdkdevicemanager-xi2.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 6750eef..4ed4157 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -171,6 +171,7 @@ create_device (GdkDeviceManager *device_manager,
GdkInputSource input_source;
GdkDeviceType type;
GdkDevice *device;
+ GdkInputMode mode;
if (dev->use == XIMasterKeyboard || dev->use == XISlaveKeyboard)
input_source = GDK_SOURCE_KEYBOARD;
@@ -198,14 +199,17 @@ create_device (GdkDeviceManager *device_manager,
case XIMasterKeyboard:
case XIMasterPointer:
type = GDK_DEVICE_TYPE_MASTER;
+ mode = GDK_MODE_SCREEN;
break;
case XISlaveKeyboard:
case XISlavePointer:
type = GDK_DEVICE_TYPE_SLAVE;
+ mode = GDK_MODE_DISABLED;
break;
case XIFloatingSlave:
default:
type = GDK_DEVICE_TYPE_FLOATING;
+ mode = GDK_MODE_DISABLED;
break;
}
@@ -213,7 +217,7 @@ create_device (GdkDeviceManager *device_manager,
"name", dev->name,
"type", type,
"input-source", input_source,
- "input-mode", (dev->use == XIMasterPointer) ? GDK_MODE_SCREEN : GDK_MODE_DISABLED,
+ "input-mode", mode,
"has-cursor", (dev->use == XIMasterPointer),
"display", display,
"device-manager", device_manager,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]