diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 3749e13..5b59d96 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -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 @@ Patch5011: xserver-1.4.99-endian.patch # 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 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Aug 20 2008 Adam Jackson 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 - 1.4.99.906-8 - Add bg-none-root patch for plymouth. diff --git a/xserver-1.5.0-hide-cursor.patch b/xserver-1.5.0-hide-cursor.patch new file mode 100644 index 0000000..da96902 --- /dev/null +++ b/xserver-1.5.0-hide-cursor.patch @@ -0,0 +1,94 @@ +From e99347a3e82e6db47dd482169b6799968afc3893 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +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 +