xserver: Branch 'server-1.5-branch'
Aaron Plattner
aplattner at kemper.freedesktop.org
Tue May 20 14:53:36 PDT 2008
Xext/panoramiX.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit b69c74d14b7a777ae02aee0a8ff81efbff8cca6e
Author: Aaron Plattner <aplattner at nvidia.com>
Date: Tue May 20 12:39:28 2008 -0700
Short-circuit PanoramiXTranslateVisualID after verifying that the visual actually exists first.
This allows using PanoramiXTranslateVisualID to test whether a given visual made
it through PanoramiXVisualConsolidate.
(cherry picked from commit 8b3d26f5b6caff1766669deb0e2100d2dee3f185)
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index eb70689..2792dc7 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -850,10 +850,6 @@ PanoramiXTranslateVisualID(int screen, VisualID orig)
VisualPtr pVisual = NULL;
int i;
- /* if screen is 0, orig is already the correct visual ID */
- if (screen == 0)
- return orig;
-
for (i = 0; i < PanoramiXNumVisuals; i++) {
if (orig == PanoramiXVisuals[i].vid) {
pVisual = &PanoramiXVisuals[i];
@@ -864,6 +860,10 @@ PanoramiXTranslateVisualID(int screen, VisualID orig)
if (!pVisual)
return 0;
+ /* if screen is 0, orig is already the correct visual ID */
+ if (screen == 0)
+ return orig;
+
/* found the original, now translate it relative to the backend screen */
for (i = 0; i < pOtherScreen->numVisuals; i++) {
VisualPtr pOtherVisual = &pOtherScreen->visuals[i];
More information about the xorg-commit
mailing list