[gtk+] Move some code around



commit 39386275a475202134d7993a4f393a4dffd8c0f1
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 16 22:54:26 2017 -0500

    Move some code around
    
    Move gdk_disable_multidevice to gdkdisplaymanager.[hc].

 gdk/gdk.c              |   23 -----------------------
 gdk/gdkdevicemanager.c |   21 +++++++++++++++++++++
 gdk/gdkdevicemanager.h |    4 ++++
 gdk/gdkmain.h          |    3 ---
 4 files changed, 25 insertions(+), 26 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 2f039c0..a754e0e 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -751,26 +751,3 @@ gdk_set_program_class (const char *program_class)
 
   gdk_progclass = g_strdup (program_class);
 }
-
-/**
- * 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)
-{
-  if (gdk_initialized)
-    return;
-
-  _gdk_disable_multidevice = TRUE;
-}
diff --git a/gdk/gdkdevicemanager.c b/gdk/gdkdevicemanager.c
index 9eb3954..91b353d 100644
--- a/gdk/gdkdevicemanager.c
+++ b/gdk/gdkdevicemanager.c
@@ -19,6 +19,7 @@
 
 #include "gdkdevicemanagerprivate.h"
 #include "gdkdisplay.h"
+#include "gdkinternals.h"
 #include "gdkintl.h"
 
 
@@ -338,3 +339,23 @@ 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;
+}
diff --git a/gdk/gdkdevicemanager.h b/gdk/gdkdevicemanager.h
index 554d2d9..7a56109 100644
--- a/gdk/gdkdevicemanager.h
+++ b/gdk/gdkdevicemanager.h
@@ -41,6 +41,10 @@ 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
 
 #endif /* __GDK_DEVICE_MANAGER_H__ */
diff --git a/gdk/gdkmain.h b/gdk/gdkmain.h
index 93a07bd..c0384b6 100644
--- a/gdk/gdkmain.h
+++ b/gdk/gdkmain.h
@@ -55,9 +55,6 @@ G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop         (void);
 GDK_AVAILABLE_IN_ALL
 void                           gdk_error_trap_pop_ignored (void);
 
-GDK_AVAILABLE_IN_ALL
-void gdk_disable_multidevice (void);
-
 G_END_DECLS
 
 #endif /* __GDK_MAIN_H__ */


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