From 629c3f473b7415069a87ef4717ec3d701978dc48 Mon Sep 17 00:00:00 2001 From: Jan Hauffa Date: Fri, 16 Jul 2010 17:56:44 +0200 Subject: [PATCH] XQuartz: RandR: Remove FAKE_RANDR code. Signed-off-by: Jan Hauffa Reviewed-by: Jeremy Huddleston --- hw/xquartz/quartz.c | 6 +---- hw/xquartz/quartzRandR.c | 52 ---------------------------------------- hw/xquartz/quartzRandR.h | 5 ---- 3 files changed, 1 insertion(+), 62 deletions(-) diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index a4d74741b..a52cac9f0 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -119,7 +119,7 @@ Bool QuartzSetupScreen( if (! quartzProcs->InitCursor(pScreen)) return FALSE; -#if defined(RANDR) && !defined(FAKE_RANDR) +#if defined(RANDR) if(!QuartzRandRInit(pScreen)) { DEBUG_LOG("Failed to init RandR extension.\n"); return FALSE; @@ -239,10 +239,6 @@ void QuartzUpdateScreens(void) { DeliverEvents(pRoot, &e, 1, NullWindow); quartzProcs->UpdateScreen(pScreen); - -#ifdef FAKE_RANDR - RREditConnectionInfo(pScreen); -#endif } void QuartzSetFullscreen(Bool state) { diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c index f61ff93d9..b3b315c59 100644 --- a/hw/xquartz/quartzRandR.c +++ b/hw/xquartz/quartzRandR.c @@ -39,61 +39,11 @@ #include "quartzRandR.h" #include "quartz.h" -#if defined(FAKE_RANDR) -#include "scrnintstr.h" -#include "windowstr.h" -#else #include #include #include -#endif -#if defined(FAKE_RANDR) - -static const int padlength[4] = {0, 3, 2, 1}; - -void -RREditConnectionInfo (ScreenPtr pScreen) -{ - xConnSetup *connSetup; - char *vendor; - xPixmapFormat *formats; - xWindowRoot *root; - xDepth *depth; - xVisualType *visual; - int screen = 0; - int d; - - connSetup = (xConnSetup *) ConnectionInfo; - vendor = (char *) connSetup + sizeof (xConnSetup); - formats = (xPixmapFormat *) ((char *) vendor + - connSetup->nbytesVendor + - padlength[connSetup->nbytesVendor & 3]); - root = (xWindowRoot *) ((char *) formats + - sizeof (xPixmapFormat) * screenInfo.numPixmapFormats); - while (screen != pScreen->myNum) - { - depth = (xDepth *) ((char *) root + - sizeof (xWindowRoot)); - for (d = 0; d < root->nDepths; d++) - { - visual = (xVisualType *) ((char *) depth + - sizeof (xDepth)); - depth = (xDepth *) ((char *) visual + - depth->nVisuals * sizeof (xVisualType)); - } - root = (xWindowRoot *) ((char *) depth); - screen++; - } - root->pixWidth = pScreen->width; - root->pixHeight = pScreen->height; - root->mmWidth = pScreen->mmWidth; - root->mmHeight = pScreen->mmHeight; -} - -#else /* defined(FAKE_RANDR) */ - #define DEFAULT_REFRESH 60 #define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag) @@ -427,5 +377,3 @@ Bool QuartzRandRInit (ScreenPtr pScreen) { pScrPriv->rrSetConfig = QuartzRandRSetConfig; return TRUE; } - -#endif /* defined(FAKE_RANDR) */ diff --git a/hw/xquartz/quartzRandR.h b/hw/xquartz/quartzRandR.h index a1902051c..711c3f3f3 100644 --- a/hw/xquartz/quartzRandR.h +++ b/hw/xquartz/quartzRandR.h @@ -27,11 +27,6 @@ * use or other dealings in this Software without prior written authorization. */ -/*define FAKE_RANDR 1*/ #define USE_DEPRECATED_CG_API 1 -#if defined(FAKE_RANDR) -void RREditConnectionInfo (ScreenPtr pScreen); -#else Bool QuartzRandRInit (ScreenPtr pScreen); -#endif