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>
This commit is contained in:
parent
6f52b10b9e
commit
418bb57a39
|
@ -280,10 +280,9 @@ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr de
|
||||||
case kXquartzDisplayChanged:
|
case kXquartzDisplayChanged:
|
||||||
DEBUG_LOG("kXquartzDisplayChanged\n");
|
DEBUG_LOG("kXquartzDisplayChanged\n");
|
||||||
QuartzUpdateScreens();
|
QuartzUpdateScreens();
|
||||||
#ifdef RANDR
|
|
||||||
/* Update our RandR info */
|
/* Update our RandR info */
|
||||||
QuartzRandRUpdateFakeModes(TRUE);
|
QuartzRandRUpdateFakeModes(TRUE);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -244,6 +244,9 @@ void QuartzUpdateScreens(void) {
|
||||||
DeliverEvents(pRoot, &e, 1, NullWindow);
|
DeliverEvents(pRoot, &e, 1, NullWindow);
|
||||||
|
|
||||||
quartzProcs->UpdateScreen(pScreen);
|
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) {
|
static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) {
|
||||||
|
|
Loading…
Reference in New Issue