diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-02-08 11:38:35 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-03-03 18:15:15 -0800 |
commit | 436deac7bc6517f1943af3efa7420e94596958ab (patch) | |
tree | e97d42794d3ba6ec12b35ac0c973de0804fdba60 | |
parent | c78d39316183d35549bc57a834042a90e24491fb (diff) |
XQuartz: RandR: Add RandR modes for the primary display in multi-monitor configs
We now support using RandR to set the resolution of the primary display (and
place a shielding window on other displays) in multi-monitor configurations.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 8cf3348e90846f5b04236479042228fb98ac8f70)
-rw-r--r-- | hw/xquartz/quartzRandR.c | 10 | ||||
-rw-r--r-- | hw/xquartz/xpr/xprScreen.c | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/hw/xquartz/quartzRandR.c b/hw/xquartz/quartzRandR.c index ede7969c7..05641a65d 100644 --- a/hw/xquartz/quartzRandR.c +++ b/hw/xquartz/quartzRandR.c @@ -413,16 +413,6 @@ static Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { if (pQuartzScreen->displayCount == 0) return FALSE; - if (pQuartzScreen->displayCount > 1) { - /* RandR operations are not well-defined for an X11 screen spanning - multiple CG displays. Create two entries for the current virtual - resolution including/excluding the menu bar. */ - - QuartzRandRRegisterMode(pScreen, &pQuartzScreen->rootlessMode); - QuartzRandRRegisterMode(pScreen, &pQuartzScreen->fullscreenMode); - return TRUE; - } - return QuartzRandREnumerateModes(pScreen, QuartzRandRRegisterModeCallback, NULL); } diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index cba358f8b..6e6d06e6b 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -196,6 +196,13 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height, ScreenPtr pScr return; } + /* If the displays are captured, we are in a RandR game mode + * on the primary display, so we only want to include the first + * display. The others are covered by the shield window. + */ + if (CGDisplayIsCaptured(kCGDirectMainDisplay)) + displayCount = 1; + displayList = malloc(displayCount * sizeof(CGDirectDisplayID)); if(!displayList) FatalError("Unable to allocate memory for list of displays.\n"); |