rpms/xorg-x11-server/OLPC-3 exa-copyarea.patch, NONE, 1.1 xserver-1.5.0-hide-cursor.patch, NONE, 1.1 xorg-x11-server.spec, 1.340, 1.341

Daniel Drake dsd at fedoraproject.org
Fri Aug 29 14:51:50 UTC 2008


Author: dsd

Update of /cvs/pkgs/rpms/xorg-x11-server/OLPC-3
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26092

Modified Files:
	xorg-x11-server.spec 
Added Files:
	exa-copyarea.patch xserver-1.5.0-hide-cursor.patch 
Log Message:
fix rendering bugs, hide initial mouse cursor

exa-copyarea.patch:

--- NEW FILE exa-copyarea.patch ---
>From 37087bc10630ee7740df1369b3e56a44fd2ad2b0 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Michel=20D=C3=A4nzer?= <michel at tungstengraphics.com>
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 at 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);
 

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/OLPC-3/xorg-x11-server.spec,v
retrieving revision 1.340
retrieving revision 1.341
diff -u -r1.340 -r1.341
--- xorg-x11-server.spec	25 Jul 2008 15:57:01 -0000	1.340
+++ xorg-x11-server.spec	29 Aug 2008 14:51:20 -0000	1.341
@@ -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 @@
 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 @@
 
 
 %changelog
+* Fri Aug 29 2008 Daniel Drake <dsd at laptop.org> 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 <dsd at laptop.org> 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)




More information about the fedora-extras-commits mailing list