From a16651f05620edaa5c478c54d8bb9332a31cc6d8 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Aug 29 2008 14:51:20 +0000 Subject: fix rendering bugs, hide initial mouse cursor --- diff --git a/exa-copyarea.patch b/exa-copyarea.patch new file mode 100644 index 0000000..3c90ff8 --- /dev/null +++ b/exa-copyarea.patch @@ -0,0 +1,43 @@ +From 37087bc10630ee7740df1369b3e56a44fd2ad2b0 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Michel=20D=C3=A4nzer?= +Date: Wed, 30 Jul 2008 18:27:33 +0200 +Subject: [PATCH] EXA: Replace open coded CopyArea logic with GC op call. + +[fixes http://dev.laptop.org/ticket/7612 :)] +[rediff by dsd@laptop.org] + +--- + exa/exa_accel.c | 18 ++++++------------ + 1 files changed, 6 insertions(+), 12 deletions(-) + +Index: xorg-server-1.4.99.906/exa/exa_accel.c +=================================================================== +--- xorg-server-1.4.99.906.orig/exa/exa_accel.c ++++ xorg-server-1.4.99.906/exa/exa_accel.c +@@ -261,20 +261,16 @@ exaDoShmPutImage(DrawablePtr pDrawable, + + if (format == ZPixmap) + { +- PixmapPtr pPixmap; ++ PixmapPtr pPixmap = ++ GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth, ++ BitsPerPixel(depth), PixmapBytePad(w, depth), ++ (pointer)data); + +- pPixmap = GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth, +- BitsPerPixel(depth), PixmapBytePad(w, depth), (pointer)data); + if (!pPixmap) + return FALSE; + +- if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, +- pGC->alu)) +- exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); +- else +- ExaDoPrepareAccess (pDrawable, EXA_PREPARE_DEST); +- fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy); +- exaFinishAccess(pDrawable, EXA_PREPARE_DEST); ++ pGC->ops->CopyArea(&pPixmap->drawable, pDrawable, pGC, sx, sy, sw, sh, ++ dx, dy); + + FreeScratchPixmapHeader(pPixmap); + diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index c3337fc..6924ff5 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: 2%{?dist} +Release: 2%{?dist}.2 URL: http://www.x.org License: MIT Group: User Interface/X @@ -57,6 +57,9 @@ Patch5002: xserver-1.4.99-ssh-isnt-local.patch Patch5007: xserver-1.5.0-bad-fbdev-thats-mine.patch #Patch5009: xserver-1.5.0-no-evdev-keyboards-kthnx.patch +Patch6000: exa-copyarea.patch +Patch6001: xserver-1.5.0-hide-cursor.patch + %define moduledir %{_libdir}/xorg/modules %define drimoduledir %{_libdir}/dri %define sdkdir %{_includedir}/xorg @@ -462,6 +465,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Aug 29 2008 Daniel Drake 1.4.99.906-2.1 +- add EXA CopyArea patch to solve rendering bugs (dlo#7612) +- Suppress displaying the cursor until an app calls XDefineCursor(). + * Fri Jul 25 2008 Daniel Drake 1.4.99.906-2 - update no-swrast patch to the one that went upstream, this one had a bug (dlopen isn't documented to populate errno) 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 +