gdk/x11: Remove gdk_disable_multidevice()

Core events will be discontinued, so this call is meaningless now.
This commit is contained in:
Carlos Garnacho
2019-05-15 00:02:48 +02:00
parent f3250172a4
commit c4cf72ecb8
4 changed files with 1 additions and 41 deletions

View File

@@ -823,7 +823,6 @@ gdk_x11_lookup_xdisplay
gdk_x11_get_server_time
gdk_x11_device_get_id
gdk_x11_device_manager_lookup
gdk_disable_multidevice
gdk_x11_display_open
gdk_x11_display_set_program_class
gdk_x11_display_get_user_time

View File

@@ -30,8 +30,6 @@
#define VIRTUAL_CORE_POINTER_ID 2
#define VIRTUAL_CORE_KEYBOARD_ID 3
static gboolean _gdk_disable_multidevice = FALSE;
GdkX11DeviceManagerCore *
_gdk_x11_device_manager_new (GdkDisplay *display)
{
@@ -50,8 +48,7 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
major = 2;
minor = 3;
if (!_gdk_disable_multidevice &&
XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
if (XIQueryVersion (xdisplay, &major, &minor) != BadRequest)
{
GdkX11DeviceManagerXI2 *device_manager_xi2;
@@ -118,12 +115,6 @@ gdk_x11_device_manager_lookup (GdkX11DeviceManagerCore *device_manager,
*
* Returns the device ID as seen by XInput2.
*
* > If gdk_disable_multidevice() has been called, this function
* > will respectively return 2/3 for the core pointer and keyboard,
* > (matching the IDs for the Virtual Core Pointer and Keyboard in
* > XInput 2), but calling this function on any slave devices (i.e.
* > those managed via XInput 1.x), will return 0.
*
* Returns: the XInput2 device ID.
**/
gint
@@ -145,21 +136,3 @@ gdk_x11_device_get_id (GdkDevice *device)
return device_id;
}
/**
* gdk_disable_multidevice:
*
* Disables multidevice support in GDKs X11 backend. This call must happen prior
* to gdk_display_open(), gtk_init() or gtk_init_check() in order to
* take effect.
*
* Most common GTK+ applications wont ever need to call this. Only
* applications that do mixed GDK/Xlib calls could want to disable
* multidevice support if such Xlib code deals with input devices in
* any way and doesnt observe the presence of XInput 2.
*/
void
gdk_disable_multidevice (void)
{
_gdk_disable_multidevice = TRUE;
}

View File

@@ -33,9 +33,6 @@ G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
GdkDevice * gdk_x11_device_manager_lookup (GdkX11DeviceManagerCore *device_manager,
gint device_id);
GDK_AVAILABLE_IN_ALL
void gdk_disable_multidevice (void);
G_END_DECLS

View File

@@ -79,15 +79,6 @@ gtk_test_init (int *argcp,
gtk_disable_setlocale();
setlocale (LC_ALL, "en_US.UTF-8");
/* XSendEvent() doesn't work yet on XI2 events.
* So at the moment gdk_test_simulate_* can only
* send events that GTK+ understands if XI2 is
* disabled, bummer.
*/
#ifdef GDK_WINDOWING_X11
gdk_disable_multidevice ();
#endif
gtk_init ();
}