[gnome-settings-daemon] cursor: Fix XFixes version checking
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] cursor: Fix XFixes version checking
- Date: Wed, 8 Jun 2011 10:50:51 +0000 (UTC)
commit b80f013419f43f37918174f951d253587397742b
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jun 8 11:49:01 2011 +0100
cursor: Fix XFixes version checking
plugins/cursor/gsd-cursor-manager.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plugins/cursor/gsd-cursor-manager.c b/plugins/cursor/gsd-cursor-manager.c
index b785aab..ac18bbf 100644
--- a/plugins/cursor/gsd-cursor-manager.c
+++ b/plugins/cursor/gsd-cursor-manager.c
@@ -42,6 +42,8 @@
#include "gsd-cursor-manager.h"
#include "gsd-input-helper.h"
+#define XFIXES_CURSOR_HIDING_MAJOR 4
+
#define GSD_CURSOR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_CURSOR_MANAGER, GsdCursorManagerPrivate))
struct GsdCursorManagerPrivate
@@ -217,8 +219,8 @@ supports_xfixes (void)
static gboolean
supports_cursor_xfixes (void)
{
- int major = XFIXES_MAJOR;
- int minor = XFIXES_MINOR;
+ int major = XFIXES_CURSOR_HIDING_MAJOR;
+ int minor = 0;
gdk_error_trap_push ();
@@ -227,13 +229,13 @@ supports_cursor_xfixes (void)
return FALSE;
}
- if (XFixesQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor) != Success) {
+ if (!XFixesQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor)) {
gdk_error_trap_pop_ignored ();
return FALSE;
}
gdk_error_trap_pop_ignored ();
- if (major >= 4)
+ if (major >= XFIXES_CURSOR_HIDING_MAJOR)
return TRUE;
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]