XQuartz: RandR: Remove FAKE_RANDR code.
Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
97b5f53064
commit
629c3f473b
|
@ -119,7 +119,7 @@ Bool QuartzSetupScreen(
|
||||||
if (! quartzProcs->InitCursor(pScreen))
|
if (! quartzProcs->InitCursor(pScreen))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
#if defined(RANDR) && !defined(FAKE_RANDR)
|
#if defined(RANDR)
|
||||||
if(!QuartzRandRInit(pScreen)) {
|
if(!QuartzRandRInit(pScreen)) {
|
||||||
DEBUG_LOG("Failed to init RandR extension.\n");
|
DEBUG_LOG("Failed to init RandR extension.\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -239,10 +239,6 @@ void QuartzUpdateScreens(void) {
|
||||||
DeliverEvents(pRoot, &e, 1, NullWindow);
|
DeliverEvents(pRoot, &e, 1, NullWindow);
|
||||||
|
|
||||||
quartzProcs->UpdateScreen(pScreen);
|
quartzProcs->UpdateScreen(pScreen);
|
||||||
|
|
||||||
#ifdef FAKE_RANDR
|
|
||||||
RREditConnectionInfo(pScreen);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuartzSetFullscreen(Bool state) {
|
void QuartzSetFullscreen(Bool state) {
|
||||||
|
|
|
@ -39,61 +39,11 @@
|
||||||
#include "quartzRandR.h"
|
#include "quartzRandR.h"
|
||||||
#include "quartz.h"
|
#include "quartz.h"
|
||||||
|
|
||||||
#if defined(FAKE_RANDR)
|
|
||||||
#include "scrnintstr.h"
|
|
||||||
#include "windowstr.h"
|
|
||||||
#else
|
|
||||||
#include <X11/extensions/randr.h>
|
#include <X11/extensions/randr.h>
|
||||||
#include <randrstr.h>
|
#include <randrstr.h>
|
||||||
#include <IOKit/graphics/IOGraphicsTypes.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 DEFAULT_REFRESH 60
|
||||||
#define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag)
|
#define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag)
|
||||||
|
|
||||||
|
@ -427,5 +377,3 @@ Bool QuartzRandRInit (ScreenPtr pScreen) {
|
||||||
pScrPriv->rrSetConfig = QuartzRandRSetConfig;
|
pScrPriv->rrSetConfig = QuartzRandRSetConfig;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined(FAKE_RANDR) */
|
|
||||||
|
|
|
@ -27,11 +27,6 @@
|
||||||
* use or other dealings in this Software without prior written authorization.
|
* use or other dealings in this Software without prior written authorization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*define FAKE_RANDR 1*/
|
|
||||||
#define USE_DEPRECATED_CG_API 1
|
#define USE_DEPRECATED_CG_API 1
|
||||||
|
|
||||||
#if defined(FAKE_RANDR)
|
|
||||||
void RREditConnectionInfo (ScreenPtr pScreen);
|
|
||||||
#else
|
|
||||||
Bool QuartzRandRInit (ScreenPtr pScreen);
|
Bool QuartzRandRInit (ScreenPtr pScreen);
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in New Issue