gdk/x11: Drop GDK_CORE_DEVICE_EVENTS environment variable

Support for core events will be discontinued, so this doesn't make sense
anymore.
This commit is contained in:
Carlos Garnacho 2019-05-15 00:08:37 +02:00
parent c4cf72ecb8
commit c4446d36de
2 changed files with 20 additions and 32 deletions

View File

@ -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>

View File

@ -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;
xdisplay = GDK_DISPLAY_XDISPLAY (display);
if (XQueryExtension (xdisplay, "XInputExtension",
&opcode, &firstevent, &firsterror))
{
int opcode, firstevent, firsterror;
Display *xdisplay;
int major, minor;
xdisplay = GDK_DISPLAY_XDISPLAY (display);
major = 2;
minor = 3;
if (XQueryExtension (xdisplay, "XInputExtension",
&opcode, &firstevent, &firsterror))
if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
{
int major, minor;
GdkX11DeviceManagerXI2 *device_manager_xi2;
major = 2;
minor = 3;
GDK_DISPLAY_NOTE (display, INPUT, g_message ("Creating XI2 device manager"));
if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
{
GdkX11DeviceManagerXI2 *device_manager_xi2;
device_manager_xi2 = g_object_new (GDK_TYPE_X11_DEVICE_MANAGER_XI2,
"display", display,
"opcode", opcode,
"major", major,
"minor", minor,
NULL);
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);
return GDK_X11_DEVICE_MANAGER_CORE (device_manager_xi2);
}
return GDK_X11_DEVICE_MANAGER_CORE (device_manager_xi2);
}
}