rpms/xorg-x11-server/devel xserver-1.5.99.902-randr-soft-getpanning.patch, NONE, 1.1 xorg-x11-server.spec, 1.406, 1.407

Adam Jackson ajax at fedoraproject.org
Tue Feb 17 19:20:30 UTC 2009


Author: ajax

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

Modified Files:
	xorg-x11-server.spec 
Added Files:
	xserver-1.5.99.902-randr-soft-getpanning.patch 
Log Message:
* Tue Feb 17 2009 Adam Jackson <ajax at redhat.com> 1.5.99.902-13
- xserver-1.5.99.902-randr-soft-getpanning.patch: Fail RRGetPanning softly
  when the driver doesn't support it.


xserver-1.5.99.902-randr-soft-getpanning.patch:

--- NEW FILE xserver-1.5.99.902-randr-soft-getpanning.patch ---
>From 38eb087aba509d85bbbf0dabf501201fd6af1a32 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax at redhat.com>
Date: Tue, 17 Feb 2009 12:59:16 -0500
Subject: [PATCH] RANDR: Fail softly on GetPanning if the screen can't do it.

Just return a zeroed-out reply in that case.  This is unambiguous, and
distinguishes "you didn't name a CRTC" from "you named a CRTC that can't
do panning".
---
 randr/rrcrtc.c |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 2160834..7b724ae 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -1038,30 +1038,31 @@ ProcRRGetPanning (ClientPtr client)
     pScreen = crtc->pScreen;
     pScrPriv = rrGetScrPriv(pScreen);
 
-    if (!pScrPriv || !pScrPriv->rrGetPanning)
+    if (!pScrPriv)
 	return RRErrorBase + BadRRCrtc;
 
+    memset(&rep, 0, sizeof(rep));
     rep.type = X_Reply;
     rep.status = RRSetConfigSuccess;
     rep.sequenceNumber = client->sequence;
     rep.length = 1;
     rep.timestamp = pScrPriv->lastSetTime.milliseconds;
 
-    if (! pScrPriv->rrGetPanning (pScreen, crtc, &total, &tracking, border))
-	return RRErrorBase + BadRRCrtc;
-
-    rep.left          = total.x1;
-    rep.top           = total.y1;
-    rep.width         = total.x2 - total.x1;
-    rep.height        = total.y2 - total.y1;
-    rep.track_left    = tracking.x1;
-    rep.track_top     = tracking.y1;
-    rep.track_width   = tracking.x2 - tracking.x1;
-    rep.track_height  = tracking.y2 - tracking.y1;
-    rep.border_left   = border[0];
-    rep.border_top    = border[1];
-    rep.border_right  = border[2];
-    rep.border_bottom = border[3];
+    if (pScrPriv->rrGetPanning &&
+	pScrPriv->rrGetPanning (pScreen, crtc, &total, &tracking, border)) {
+	rep.left          = total.x1;
+	rep.top           = total.y1;
+	rep.width         = total.x2 - total.x1;
+	rep.height        = total.y2 - total.y1;
+	rep.track_left    = tracking.x1;
+	rep.track_top     = tracking.y1;
+	rep.track_width   = tracking.x2 - tracking.x1;
+	rep.track_height  = tracking.y2 - tracking.y1;
+	rep.border_left   = border[0];
+	rep.border_top    = border[1];
+	rep.border_right  = border[2];
+	rep.border_bottom = border[3];
+    }
 
     if (client->swapped) {
 	swaps(&rep.sequenceNumber, n);
-- 
1.6.1.3



Index: xorg-x11-server.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-server/devel/xorg-x11-server.spec,v
retrieving revision 1.406
retrieving revision 1.407
diff -u -r1.406 -r1.407
--- xorg-x11-server.spec	16 Feb 2009 06:25:26 -0000	1.406
+++ xorg-x11-server.spec	17 Feb 2009 19:19:59 -0000	1.407
@@ -19,7 +19,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.5.99.902
-Release:   12%{?dist}
+Release:   13%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -43,6 +43,13 @@
 # "useful" xvfb-run script
 Source20:  http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh
 
+# ABI version provides.
+Source30: find-provides
+%{expand:%%define prev__find_provides %{__find_provides}}
+%define pc_path %{buildroot}/%{_libdir}/pkgconfig/xorg-server.pc
+#define __find_provides %{SOURCE30} %{pc_path} %{prev__find_provides}
+%define __find_provides %{nil}
+
 # OpenGL compositing manager feature/optimization patches.
 Patch100:  xorg-x11-server-1.1.0-no-move-damage.patch
 Patch101:  xserver-1.4.99-dont-backfill-bg-none.patch
@@ -98,6 +105,9 @@
 # Make autoconfiguration chose nouveau driver for NVIDIA GPUs
 Patch6017: xserver-1.5.99.902-nouveau.patch
 
+# hackaround for non-randr drivers, should be in final
+Patch6018: xserver-1.5.99.902-randr-soft-getpanning.patch
+
 %define moduledir	%{_libdir}/xorg/modules
 %define drimoduledir	%{_libdir}/dri
 %define sdkdir		%{_includedir}/xorg
@@ -514,6 +524,10 @@
 
 
 %changelog
+* Tue Feb 17 2009 Adam Jackson <ajax at redhat.com> 1.5.99.902-13
+- xserver-1.5.99.902-randr-soft-getpanning.patch: Fail RRGetPanning softly
+  when the driver doesn't support it.
+
 * Mon Feb 16 2009 Ben Skeggs <bskeggs at redhat.com> 1.5.99.902-12
 - xserver-1.5.99.902-nouveau.patch: select nouveau as default driver
   for NVIDIA GPUs




More information about the fedora-extras-commits mailing list