summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-01-13 17:12:17 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2011-01-30 17:06:43 -0800
commite7871a95125d85bef37fee51e8f8691a058a984d (patch)
treeb55df66969a5ed2ffb7fd5973b783f5068734001
parent824ebda72ab61f0640a14d79ef893a1d78644db8 (diff)
XQuartz: Call RRScreenSizeNotify after handling externally-generated XP_EVENT_DISPLAY_CHANGED
We get an XP_EVENT_DISPLAY_CHANGED event when our display configuration is changed. If this change was caused by hotplugging a monitor or Mac Display Preferences changes by the user, we need to call RRScreenSizeNotify in order to ensure new connections get the correct screen size. http://xquartz.macosforge.org/trac/ticket/460 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 418bb57a3923311338baa8a85c0794a72e15ceeb)
-rw-r--r--hw/xquartz/darwinEvents.c3
-rw-r--r--hw/xquartz/quartz.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 74fadf465..b9af4a570 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -279,10 +279,9 @@ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr de
case kXquartzDisplayChanged:
DEBUG_LOG("kXquartzDisplayChanged\n");
QuartzUpdateScreens();
-#ifdef RANDR
+
/* Update our RandR info */
QuartzRandRUpdateFakeModes(TRUE);
-#endif
break;
default:
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 6c185a8eb..156de1395 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -244,6 +244,9 @@ void QuartzUpdateScreens(void) {
DeliverEvents(pRoot, &e, 1, NullWindow);
quartzProcs->UpdateScreen(pScreen);
+
+ /* Tell RandR about the new size, so new connections get the correct info */
+ RRScreenSizeNotify(pScreen);
}
static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {