[clutter/wip/clutter-1.99: 78/79] 2.0: Enable XInput support by default



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

    2.0: 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 |   23 ++++++++---------------
 clutter/x11/clutter-x11.h         |    1 +
 2 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c
index 904ac0a..fd8ab00 100644
--- a/clutter/x11/clutter-backend-x11.c
+++ b/clutter/x11/clutter-backend-x11.c
@@ -95,7 +95,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;
 
@@ -337,10 +337,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;
     }
 
@@ -529,10 +529,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,19 +943,12 @@ clutter_x11_set_display (Display *xdpy)
  * Since XInput might not be supported by the X server, you might
  * want to use clutter_x11_has_xinput() to see if support was enabled.
  *
- *
+ * Deprecated: 2.0: This function does not do anything; XInput support
+ *   is enabled by default in Clutter.
  */
 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 350ef31..cab65b1 100644
--- a/clutter/x11/clutter-x11.h
+++ b/clutter/x11/clutter-x11.h
@@ -128,6 +128,7 @@ gboolean clutter_x11_has_event_retrieval (void);
 
 ClutterStage *clutter_x11_get_stage_from_window (Window win);
 
+CLUTTER_DEPRECATED_IN_2_0
 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]