rpms/xorg-x11-server/devel xserver-1.5.0-hide-cursor.patch, NONE, 1.1 xorg-x11-server.spec, 1.343, 1.344
Adam Jackson
ajax at fedoraproject.org
Fri Aug 22 20:09:22 UTC 2008
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-server/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31825
Modified Files:
xorg-x11-server.spec
Added Files:
xserver-1.5.0-hide-cursor.patch
Log Message:
* Wed Aug 20 2008 Adam Jackson <ajax at redhat.com> 1.4.99.906-9
- xserver-1.5.0-hide-cursor.patch: Suppress displaying the cursor until
an app calls XDefineCursor().
xserver-1.5.0-hide-cursor.patch:
--- NEW FILE xserver-1.5.0-hide-cursor.patch ---
>From e99347a3e82e6db47dd482169b6799968afc3893 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Wed, 20 Aug 2008 10:11:07 -0400
Subject: [PATCH] Hide the cursor until the first XDefineCursor() call.
---
xfixes/cursor.c | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index d51251f..c8c4c9f 100755
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -70,7 +70,7 @@
return BadCursor; \
} \
}
-
+
/*
* There is a global list of windows selecting for cursor events
*/
@@ -109,6 +109,7 @@
typedef struct _CursorScreen {
DisplayCursorProcPtr DisplayCursor;
+ ChangeWindowAttributesProcPtr ChangeWindowAttributes;
CloseScreenProcPtr CloseScreen;
CursorHideCountPtr pCursorHideCounts;
} CursorScreenRec, *CursorScreenPtr;
@@ -119,6 +120,9 @@
#define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func)
#define Unwrap(as,s,elt) ((s)->elt = (as)->elt)
+/* The cursor doesn't show up until the first XDefineCursor() */
+static Bool CursorVisible = FALSE;
+
static Bool
CursorDisplayCursor (ScreenPtr pScreen,
CursorPtr pCursor)
@@ -128,7 +132,7 @@
Unwrap (cs, pScreen, DisplayCursor);
- if (cs->pCursorHideCounts != NULL) {
+ if (cs->pCursorHideCounts != NULL || !CursorVisible) {
ret = (*pScreen->DisplayCursor) (pScreen, pInvisibleCursor);
} else {
ret = (*pScreen->DisplayCursor) (pScreen, pCursor);
@@ -161,6 +165,24 @@
}
static Bool
+CursorChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CursorScreenPtr cs = GetCursorScreen(pScreen);
+ Bool ret;
+ extern char *ConnectionInfo;
+
+ if ((mask & CWCursor) && ConnectionInfo)
+ CursorVisible = TRUE;
+
+ Unwrap(cs, pScreen, ChangeWindowAttributes);
+ ret = pScreen->ChangeWindowAttributes(pWin, mask);
+ Wrap(cs, pScreen, ChangeWindowAttributes, CursorChangeWindowAttributes);
+
+ return ret;
+}
+
+static Bool
CursorCloseScreen (int index, ScreenPtr pScreen)
{
CursorScreenPtr cs = GetCursorScreen (pScreen);
@@ -168,6 +190,7 @@
Unwrap (cs, pScreen, CloseScreen);
Unwrap (cs, pScreen, DisplayCursor);
+ Unwrap (cs, pScreen, ChangeWindowAttributes);
deleteCursorHideCountsForScreen(pScreen);
ret = (*pScreen->CloseScreen) (index, pScreen);
xfree (cs);
@@ -1042,6 +1065,8 @@
return FALSE;
Wrap (cs, pScreen, CloseScreen, CursorCloseScreen);
Wrap (cs, pScreen, DisplayCursor, CursorDisplayCursor);
+ Wrap (cs, pScreen, ChangeWindowAttributes,
+ CursorChangeWindowAttributes);
cs->pCursorHideCounts = NULL;
SetCursorScreen (pScreen, cs);
}
--
1.5.6.4
Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -r1.343 -r1.344
--- xorg-x11-server.spec 15 Aug 2008 00:48:14 -0000 1.343
+++ xorg-x11-server.spec 22 Aug 2008 20:08:52 -0000 1.344
@@ -19,7 +19,7 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.4.99.906
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@@ -67,8 +67,8 @@
# evdev keyboard map fix
Patch5013: xserver-1.5.0-xkb-fix-ProcXkbSetXYZ-to-work-on-all.patch
Patch5014: xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch
-
Patch5015: xserver-1.5.0-enable-selinux.patch
+Patch6000: xserver-1.5.0-hide-cursor.patch
%define moduledir %{_libdir}/xorg/modules
%define drimoduledir %{_libdir}/dri
@@ -494,6 +494,10 @@
%changelog
+* Wed Aug 20 2008 Adam Jackson <ajax at redhat.com> 1.4.99.906-9
+- xserver-1.5.0-hide-cursor.patch: Suppress displaying the cursor until
+ an app calls XDefineCursor().
+
* Thu Aug 14 2008 Kristian Høgsberg <krh at redhat.com> - 1.4.99.906-8
- Add bg-none-root patch for plymouth.
More information about the fedora-extras-commits
mailing list