[clutter/clutter-1.16] Remove use of XFixes for showing/hiding the cursor



commit 8faae9d2377648f32a9a277fd467b06f0c140525
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Aug 29 13:14:13 2013 -0400

    Remove use of XFixes for showing/hiding the cursor
    
    XFixesShowCursor / XFixesHideCursor does not actually take the suppled
    window argument into account -- the effect is actually global. Use
    XDefineCursor instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707071

 clutter/config.h.win32.in       |    3 ---
 clutter/x11/clutter-stage-x11.c |   38 --------------------------------------
 clutter/x11/clutter-stage-x11.h |    1 -
 configure.ac                    |   16 ----------------
 4 files changed, 0 insertions(+), 58 deletions(-)
---
diff --git a/clutter/config.h.win32.in b/clutter/config.h.win32.in
index d3583bf..1758b77 100644
--- a/clutter/config.h.win32.in
+++ b/clutter/config.h.win32.in
@@ -111,9 +111,6 @@
 /* Define to 1 if we have the XEXT X extension */
 /*#undef HAVE_XEXT*/
 
-/* Define to 1 if we have the XFIXES X extension */
-/*#undef HAVE_XFIXES*/
-
 /* Define to 1 if X Generic Extensions is available */
 /* #undef HAVE_XGE */
 
diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c
index 9907840..047e08c 100644
--- a/clutter/x11/clutter-stage-x11.c
+++ b/clutter/x11/clutter-stage-x11.c
@@ -46,10 +46,6 @@
 #include "clutter-private.h"
 #include "clutter-stage-private.h"
 
-#ifdef HAVE_XFIXES
-#include <X11/extensions/Xfixes.h>
-#endif
-
 #define STAGE_X11_IS_MAPPED(s)  ((((ClutterStageX11 *) (s))->wm_state & STAGE_X11_WITHDRAWN) == 0)
 
 static ClutterStageWindowIface *clutter_stage_window_parent_iface = NULL;
@@ -366,22 +362,10 @@ set_cursor_visible (ClutterStageX11 *stage_x11)
 
   if (stage_x11->is_cursor_visible)
     {
-#if HAVE_XFIXES
-      if (stage_x11->cursor_hidden_xfixes)
-        {
-          XFixesShowCursor (backend_x11->xdpy, stage_x11->xwin);
-          stage_x11->cursor_hidden_xfixes = FALSE;
-        }
-#else
       XUndefineCursor (backend_x11->xdpy, stage_x11->xwin);
-#endif /* HAVE_XFIXES */
     }
   else
     {
-#if HAVE_XFIXES
-      XFixesHideCursor (backend_x11->xdpy, stage_x11->xwin);
-      stage_x11->cursor_hidden_xfixes = TRUE;
-#else
       XColor col;
       Pixmap pix;
       Cursor curs;
@@ -394,7 +378,6 @@ set_cursor_visible (ClutterStageX11 *stage_x11)
                                   1, 1);
       XFreePixmap (backend_x11->xdpy, pix);
       XDefineCursor (backend_x11->xdpy, stage_x11->xwin, curs);
-#endif /* HAVE_XFIXES */
     }
 }
 
@@ -897,7 +880,6 @@ clutter_stage_x11_init (ClutterStageX11 *stage)
   stage->is_foreign_xwin = FALSE;
   stage->fullscreening = FALSE;
   stage->is_cursor_visible = TRUE;
-  stage->cursor_hidden_xfixes = FALSE;
   stage->accept_focus = TRUE;
 
   stage->title = NULL;
@@ -1194,26 +1176,6 @@ clutter_stage_x11_translate_event (ClutterEventTranslator *translator,
         }
       break;
 
-    case EnterNotify:
-#if HAVE_XFIXES
-      if (!stage_x11->is_cursor_visible && !stage_x11->cursor_hidden_xfixes)
-        {
-          XFixesHideCursor (backend_x11->xdpy, stage_x11->xwin);
-          stage_x11->cursor_hidden_xfixes = TRUE;
-        }
-#endif
-      break;
-
-    case LeaveNotify:
-#if HAVE_XFIXES
-      if (stage_x11->cursor_hidden_xfixes)
-        {
-          XFixesShowCursor (backend_x11->xdpy, stage_x11->xwin);
-          stage_x11->cursor_hidden_xfixes = FALSE;
-        }
-#endif
-      break;
-
     case Expose:
       {
         XExposeEvent *expose = (XExposeEvent *) xevent;
diff --git a/clutter/x11/clutter-stage-x11.h b/clutter/x11/clutter-stage-x11.h
index feaacf9..453373c 100644
--- a/clutter/x11/clutter-stage-x11.h
+++ b/clutter/x11/clutter-stage-x11.h
@@ -69,7 +69,6 @@ struct _ClutterStageX11
   guint viewport_initialized  : 1;
   guint accept_focus          : 1;
   guint fullscreen_on_realize : 1;
-  guint cursor_hidden_xfixes  : 1;
   guint fixed_scale_factor    : 1;
 };
 
diff --git a/configure.ac b/configure.ac
index 6b8907c..090512a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -633,22 +633,6 @@ AS_IF([test "x$SUPPORT_X11" = "x1"],
               [AC_MSG_ERROR([Not found])]
         )
 
-        # XFIXES (required)
-        AC_MSG_CHECKING([for XFIXES extension >= $XFIXES_REQ_VERSION])
-        PKG_CHECK_EXISTS([xfixes >= $XFIXES_REQ_VERSION], [have_xfixes=yes], [have_xfixes=no])
-        AS_IF([test "x$have_xfixes" = "xyes"],
-              [
-                AC_DEFINE(HAVE_XFIXES, [1], [Define to 1 if we have the XFIXES X extension])
-
-                X11_LIBS="$X11_LIBS -lXfixes"
-                X11_PC_FILES="$X11_PC_FILES xfixes >= $XFIXES_REQ_VERSION"
-                X11_EXTS="$X11_EXTS xfixes"
-
-                AC_MSG_RESULT([found])
-              ],
-              [AC_MSG_ERROR([Not found])]
-        )
-
         # XDAMAGE (required)
         AC_MSG_CHECKING([for XDAMAGE extension])
         PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])


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