Commit 4c40accb authored by Matthias Clasen's avatar Matthias Clasen
Browse files

gdk: Move gdk_disable_multidevice tot he X11 backend

This api only ever did something for X11, so move
it there. Update the docs and adapt the only caller.
parent 0cfc812a
......@@ -676,7 +676,6 @@ gdk_seat_capabilities_get_type
<TITLE>GdkDeviceManager</TITLE>
<FILE>gdkdevicemanager</FILE>
GdkDeviceManager
gdk_disable_multidevice
gdk_device_manager_get_display
gdk_device_manager_list_devices
......@@ -914,6 +913,7 @@ 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
......
......@@ -339,23 +339,3 @@ gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
return GDK_DEVICE_MANAGER_GET_CLASS (device_manager)->list_devices (device_manager, type);
}
/**
* gdk_disable_multidevice:
*
* Disables multidevice support in GDK. 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.
*
* Since: 3.0
*/
void
gdk_disable_multidevice (void)
{
_gdk_disable_multidevice = TRUE;
}
......@@ -41,9 +41,6 @@ GDK_DEPRECATED_IN_3_20
GList * gdk_device_manager_list_devices (GdkDeviceManager *device_manager,
GdkDeviceType type);
GDK_AVAILABLE_IN_ALL
void gdk_disable_multidevice (void);
G_END_DECLS
......
......@@ -31,7 +31,6 @@
guint _gdk_debug_flags = 0;
GList *_gdk_default_filters = NULL;
gboolean _gdk_disable_multidevice = FALSE;
guint _gdk_gl_flags = 0;
guint _gdk_vulkan_flags = 0;
GdkRenderingMode _gdk_rendering_mode = GDK_RENDERING_MODE_SIMILAR;
......@@ -294,7 +294,6 @@ struct _GdkWindow
#define GDK_WINDOW_DESTROYED(d) (((GdkWindow *)(d))->destroyed)
extern gint _gdk_screen_number;
extern gboolean _gdk_disable_multidevice;
GdkEvent* _gdk_event_unqueue (GdkDisplay *display);
......
......@@ -31,6 +31,8 @@
#define VIRTUAL_CORE_POINTER_ID 2
#define VIRTUAL_CORE_KEYBOARD_ID 3
static gboolean _gdk_disable_multidevice = FALSE;
GdkDeviceManager *
_gdk_x11_device_manager_new (GdkDisplay *display)
{
......@@ -156,3 +158,23 @@ 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.
*
* Since: 3.0
*/
void
gdk_disable_multidevice (void)
{
_gdk_disable_multidevice = TRUE;
}
......@@ -32,6 +32,9 @@ G_BEGIN_DECLS
GDK_AVAILABLE_IN_3_2
GdkDevice * gdk_x11_device_manager_lookup (GdkDeviceManager *device_manager,
gint device_id);
GDK_AVAILABLE_IN_ALL
void gdk_disable_multidevice (void);
G_END_DECLS
......
......@@ -40,6 +40,10 @@
#include <gtk/gtk.h>
#define GTK_COMPILATION
#ifdef GDK_WINDOWING_X11
#include <gdk/x11/gdkx.h>
#endif
/**
* SECTION:gtktesting
* @Short_description: Utilities for testing GTK+ applications
......@@ -94,7 +98,9 @@ gtk_test_init (int *argcp,
* send events that GTK+ understands if XI2 is
* disabled, bummer.
*/
#ifdef GDK_WINDOWING_X11
gdk_disable_multidevice ();
#endif
gtk_init ();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment