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
This commit is contained in:
Jasper St. Pierre 2013-08-29 13:14:13 -04:00 committed by Emmanuele Bassi
parent 98e03fc03f
commit 0fda81feab
4 changed files with 0 additions and 58 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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;
};

View File

@ -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])