summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hauffa <hauffa@in.tum.de>2010-07-16 17:56:44 +0200
committerJeremy Huddleston <jeremyhu@apple.com>2010-09-28 09:50:34 -0700
commit629c3f473b7415069a87ef4717ec3d701978dc48 (patch)
treeffc36282010440809507a573ba5acf5c6d491577
parent97b5f5306437bfd13390485fc7a58a363c261ec9 (diff)
XQuartz: RandR: Remove FAKE_RANDR code.
Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r--hw/xquartz/quartz.c6
-rw-r--r--hw/xquartz/quartzRandR.c52
-rw-r--r--hw/xquartz/quartzRandR.h5
3 files changed, 1 insertions, 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,60 +39,10 @@
#include "quartzRandR.h"
#include "quartz.h"
-#if defined(FAKE_RANDR)
-#include "scrnintstr.h"
-#include "windowstr.h"
-#else
#include <X11/extensions/randr.h>
#include <randrstr.h>
#include <IOKit/graphics/IOGraphicsTypes.h>
-#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