[clutter] Enable XInput support by default



commit 47c1e26385a3451048f6e2166576b931ed8895aa
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sun Oct 7 22:57:04 2012 +0100

    Enable XInput support by default
    
    Instead of using core events, we should move into the XXI century, and
    use the XInput extension.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=673838

 clutter/x11/clutter-backend-x11.c |   25 +++++++++++--------------
 clutter/x11/clutter-x11.h         |    1 +
 2 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c
index 52a551d..2d8f4ba 100644
--- a/clutter/x11/clutter-backend-x11.c
+++ b/clutter/x11/clutter-backend-x11.c
@@ -94,7 +94,7 @@ static const gchar *atom_names[] = {
 
 /* various flags corresponding to pre init setup calls */
 static gboolean _no_xevent_retrieval = FALSE;
-static gboolean clutter_enable_xinput = FALSE;
+static gboolean clutter_enable_xinput = TRUE;
 static gboolean clutter_enable_argb = FALSE;
 static Display  *_foreign_dpy = NULL;
 
@@ -336,10 +336,10 @@ clutter_backend_x11_pre_parse (ClutterBackend  *backend,
       env_string = NULL;
     }
 
-  env_string = g_getenv ("CLUTTER_ENABLE_XINPUT");
+  env_string = g_getenv ("CLUTTER_DISABLE_XINPUT");
   if (env_string)
     {
-      clutter_enable_xinput = TRUE;
+      clutter_enable_xinput = FALSE;
       env_string = NULL;
     }
 
@@ -528,10 +528,10 @@ static const GOptionEntry entries[] =
   },
 #if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2)
   {
-    "enable-xinput", 0,
-    0,
+    "disable-xinput", 0,
+    G_OPTION_FLAG_REVERSE,
     G_OPTION_ARG_NONE, &clutter_enable_xinput,
-    N_("Enable XInput support"), NULL
+    N_("Disable XInput support"), NULL
   },
 #endif /* HAVE_XINPUT */
   { NULL }
@@ -943,18 +943,15 @@ clutter_x11_set_display (Display *xdpy)
  * want to use clutter_x11_has_xinput() to see if support was enabled.
  *
  * Since: 0.8
+ *
+ * Deprecated: 1.14: This function does not do anything; XInput support
+ *   is enabled by default in Clutter. Use the CLUTTER_DISABLE_XINPUT
+ *   environment variable to disable XInput support and use Xlib core
+ *   events instead.
  */
 void
 clutter_x11_enable_xinput (void)
 {
-  if (_clutter_context_is_initialized ())
-    {
-      g_warning ("%s() can only be used before calling clutter_init()",
-                 G_STRFUNC);
-      return;
-    }
-
-  clutter_enable_xinput = TRUE;
 }
 
 /**
diff --git a/clutter/x11/clutter-x11.h b/clutter/x11/clutter-x11.h
index df04a83..6913280 100644
--- a/clutter/x11/clutter-x11.h
+++ b/clutter/x11/clutter-x11.h
@@ -128,6 +128,7 @@ ClutterStage *clutter_x11_get_stage_from_window (Window win);
 CLUTTER_DEPRECATED_FOR(clutter_device_manager_peek_devices)
 const GSList* clutter_x11_get_input_devices (void);
 
+CLUTTER_DEPRECATED_IN_1_14
 void     clutter_x11_enable_xinput (void);
 gboolean clutter_x11_has_xinput (void);
 



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