[gtk/wip/carlosg/no-x11-core-events: 3/5] gdk/x11: Drop GDK_CORE_DEVICE_EVENTS environment variable
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/no-x11-core-events: 3/5] gdk/x11: Drop GDK_CORE_DEVICE_EVENTS environment variable
- Date: Tue, 14 May 2019 23:07:47 +0000 (UTC)
commit c4446d36deafa431d53bfa4240e701cac2febaca
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed May 15 00:08:37 2019 +0200
gdk/x11: Drop GDK_CORE_DEVICE_EVENTS environment variable
Support for core events will be discontinued, so this doesn't make sense
anymore.
docs/reference/gtk/x11.sgml | 9 ---------
gdk/x11/gdkdevicemanager-x11.c | 43 ++++++++++++++++++++----------------------
2 files changed, 20 insertions(+), 32 deletions(-)
---
diff --git a/docs/reference/gtk/x11.sgml b/docs/reference/gtk/x11.sgml
index 0a0522e068..4947beb1bf 100644
--- a/docs/reference/gtk/x11.sgml
+++ b/docs/reference/gtk/x11.sgml
@@ -65,15 +65,6 @@ The X11 GDK backend can be influenced with some additional environment variables
</para>
</formalpara>
-<formalpara>
- <title><envar>GDK_CORE_DEVICE_EVENTS</envar></title>
-
- <para>
- If set, GDK makes does not use the XInput extension, and only reacts
- to core X input events.
- </para>
-</formalpara>
-
<formalpara>
<title><envar>GDK_SCALE</envar></title>
diff --git a/gdk/x11/gdkdevicemanager-x11.c b/gdk/x11/gdkdevicemanager-x11.c
index 7fec227aef..9a5312be23 100644
--- a/gdk/x11/gdkdevicemanager-x11.c
+++ b/gdk/x11/gdkdevicemanager-x11.c
@@ -33,36 +33,33 @@
GdkX11DeviceManagerCore *
_gdk_x11_device_manager_new (GdkDisplay *display)
{
- if (!g_getenv ("GDK_CORE_DEVICE_EVENTS"))
- {
- int opcode, firstevent, firsterror;
- Display *xdisplay;
+ int opcode, firstevent, firsterror;
+ Display *xdisplay;
- xdisplay = GDK_DISPLAY_XDISPLAY (display);
+ xdisplay = GDK_DISPLAY_XDISPLAY (display);
- if (XQueryExtension (xdisplay, "XInputExtension",
- &opcode, &firstevent, &firsterror))
- {
- int major, minor;
+ if (XQueryExtension (xdisplay, "XInputExtension",
+ &opcode, &firstevent, &firsterror))
+ {
+ int major, minor;
- major = 2;
- minor = 3;
+ major = 2;
+ minor = 3;
- if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
- {
- GdkX11DeviceManagerXI2 *device_manager_xi2;
+ if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
+ {
+ GdkX11DeviceManagerXI2 *device_manager_xi2;
- GDK_DISPLAY_NOTE (display, INPUT, g_message ("Creating XI2 device manager"));
+ GDK_DISPLAY_NOTE (display, INPUT, g_message ("Creating XI2 device manager"));
- device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2,
- "display", display,
- "opcode", opcode,
- "major", major,
- "minor", minor,
- NULL);
+ device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2,
+ "display", display,
+ "opcode", opcode,
+ "major", major,
+ "minor", minor,
+ NULL);
- return GDK_X11_DEVICE_MANAGER_CORE (device_manager_xi2);
- }
+ return GDK_X11_DEVICE_MANAGER_CORE (device_manager_xi2);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]