rpms/xorg-x11-server/F-13 xserver-1.8.0-dri2-fix-handling-of-redirected-pixmaps.patch, NONE, 1.1 xorg-x11-server.spec, 1.517, 1.518

drago01 drago01 at fedoraproject.org
Fri Apr 23 18:25:19 UTC 2010


Author: drago01

Update of /cvs/pkgs/rpms/xorg-x11-server/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv1203

Modified Files:
	xorg-x11-server.spec 
Added Files:
	xserver-1.8.0-dri2-fix-handling-of-redirected-pixmaps.patch 
Log Message:
fix bug 577142

xserver-1.8.0-dri2-fix-handling-of-redirected-pixmaps.patch:
 glx/glxdri2.c             |    2 +-
 hw/xfree86/dri2/dri2.c    |    5 ++++-
 hw/xfree86/dri2/dri2.h    |    2 +-
 hw/xfree86/dri2/dri2ext.c |    3 +--
 4 files changed, 7 insertions(+), 5 deletions(-)

--- NEW FILE xserver-1.8.0-dri2-fix-handling-of-redirected-pixmaps.patch ---
>From 7e80526c1ce53d7228680ac403bf89d3874d198f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel at daenzer.net>
Date: Fri, 23 Apr 2010 15:54:28 +0200
Subject: [PATCH] DRI2: Fix handling of redirected pixmaps

There's a problem with this change (and potentially in DRI2SwapEvent()
even before it): at least the pixmaps backing redirected windows still
have ->drawable.id == 0. This can result in weird behaviour with a GLX
compositing manager, e.g. when running the same app twice in a row: the
second window will show a static snapshot of the first one, because the
compositing manager gets the DRI2 front buffer from the first, since
destroyed window.
---
 glx/glxdri2.c             |    2 +-
 hw/xfree86/dri2/dri2.c    |    5 ++++-
 hw/xfree86/dri2/dri2.h    |    2 +-
 hw/xfree86/dri2/dri2ext.c |    2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bde519a..a70bc97 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -457,7 +457,7 @@ __glXDRIscreenCreateDrawable(__GLXscreen *screen,
     private->base.waitGL	= __glXDRIdrawableWaitGL;
     private->base.waitX		= __glXDRIdrawableWaitX;
 
-    if (DRI2CreateDrawable(pDraw)) {
+    if (DRI2CreateDrawable(pDraw, drawId)) {
 	    xfree(private);
 	    return NULL;
     }
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 63bef28..5d02378 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -105,11 +105,14 @@ DRI2GetDrawable(DrawablePtr pDraw)
 }
 
 int
-DRI2CreateDrawable(DrawablePtr pDraw)
+DRI2CreateDrawable(DrawablePtr pDraw, XID id)
 {
     DRI2DrawablePtr pPriv;
     int rc;
 
+    if (!pDraw->id)
+       pDraw->id = id;
+
     rc = dixLookupResourceByType((pointer *) &pPriv, pDraw->id,
 				 dri2DrawableRes, NULL, DixReadAccess);
     if (rc == Success || rc != BadValue)
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 1c8626b..4b7a65c 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -193,7 +193,7 @@ extern _X_EXPORT Bool DRI2Connect(ScreenPtr pScreen,
 
 extern _X_EXPORT Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic);
 
-extern _X_EXPORT int DRI2CreateDrawable(DrawablePtr pDraw);
+extern _X_EXPORT int DRI2CreateDrawable(DrawablePtr pDraw, XID id);
 
 extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw);
 
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index 1ac4a5f..35dac47 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -167,7 +167,7 @@ ProcDRI2CreateDrawable(ClientPtr client)
 		       &pDrawable, &status))
 	return status;
 
-    status = DRI2CreateDrawable(pDrawable);
+    status = DRI2CreateDrawable(pDrawable, stuff->drawable);
     if (status != Success)
 	return status;
 
-- 
1.6.6.1



Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/F-13/xorg-x11-server.spec,v
retrieving revision 1.517
retrieving revision 1.518
diff -u -p -r1.517 -r1.518
--- xorg-x11-server.spec	20 Apr 2010 18:42:36 -0000	1.517
+++ xorg-x11-server.spec	23 Apr 2010 18:25:19 -0000	1.518
@@ -19,7 +19,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.8.0
-Release:   7%{?gitdate:.%{gitdate}}%{dist}
+Release:   8%{?gitdate:.%{gitdate}}%{dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -90,6 +90,7 @@ Patch6055: xserver-1.7.6-export-dix-func
 Patch6056: xserver-1.7.6-export-more-dix-functions.patch
 Patch6057: xserver-1.8.0-xorg.conf.d-changes.patch
 Patch6058: xserver-1.8.0-glxdri2-resource-conversion.patch
+Patch6059: xserver-1.8.0-dri2-fix-handling-of-redirected-pixmaps.patch
 
 %define moduledir	%{_libdir}/xorg/modules
 %define drimoduledir	%{_libdir}/dri
@@ -531,6 +532,10 @@ rm -rf $RPM_BUILD_ROOT
 %{xserver_source_dir}
 
 %changelog
+* Fri Apr 23 2010 Adel Gadllah <adel.gadllah at gmail.com>  1.8.0-8
+- xserver-1.8.0-dri2-fix-handling-of-redirected-pixmaps.patch:
+  Fix handling of redirected pixmaps. (RH #577142)
+
 * Tue Apr 20 2010 Adam Jackson <ajax at redhat.com> 1.8.0-7
 - xserver-1.8.0-glxdri2-resource-conversion.patch: Fix crash on exit from
   GLX apps with DRI2 drivers. (#579756)



More information about the scm-commits mailing list