[gtk/wip/carlosg/no-x11-core-events: 2/5] gdk/x11: Remove gdk_disable_multidevice()



commit c4cf72ecb8fbcb0b874b46045e3653250fbeea55
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed May 15 00:02:48 2019 +0200

    gdk/x11: Remove gdk_disable_multidevice()
    
    Core events will be discontinued, so this call is meaningless now.

 docs/reference/gdk/gdk4-sections.txt |  1 -
 gdk/x11/gdkdevicemanager-x11.c       | 29 +----------------------------
 gdk/x11/gdkx11devicemanager.h        |  3 ---
 gtk/gtktestutils.c                   |  9 ---------
 4 files changed, 1 insertion(+), 41 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index 8eb27f7c89..902b724ba3 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -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
diff --git a/gdk/x11/gdkdevicemanager-x11.c b/gdk/x11/gdkdevicemanager-x11.c
index 68cd0a06bf..7fec227aef 100644
--- a/gdk/x11/gdkdevicemanager-x11.c
+++ b/gdk/x11/gdkdevicemanager-x11.c
@@ -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 won’t 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 doesn’t observe the presence of XInput 2.
- */
-void
-gdk_disable_multidevice (void)
-{
-  _gdk_disable_multidevice = TRUE;
-}
diff --git a/gdk/x11/gdkx11devicemanager.h b/gdk/x11/gdkx11devicemanager.h
index 51833a954a..b0cd50b423 100644
--- a/gdk/x11/gdkx11devicemanager.h
+++ b/gdk/x11/gdkx11devicemanager.h
@@ -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
 
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 75d62dc72d..34c802bced 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -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 ();
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]