XQuartz: Reposition windows when we enter fullscreen to ensure our root window

(cherry picked from commit 7617d3659b5481ef85aecc1f936e7dd2662bdfbd)
This commit is contained in:
Jeremy Huddleston 2008-12-24 00:39:06 -08:00
parent 895186e026
commit ae8dc47fd9

View File

@ -324,6 +324,10 @@ void QuartzSetFullscreen(Bool state) {
if (quartzHasRoot && !quartzEnableRootless) if (quartzHasRoot && !quartzEnableRootless)
RootlessShowAllWindows (); RootlessShowAllWindows ();
if (quartzHasRoot || quartzEnableRootless) {
RootlessRepositionWindows(screenInfo.screens[0]);
}
/* Somehow the menubar manages to interfere with our event stream /* Somehow the menubar manages to interfere with our event stream
* in fullscreen mode, even though it's not visible. * in fullscreen mode, even though it's not visible.
*/ */
@ -341,18 +345,18 @@ void QuartzSetRootless(Bool state) {
quartzEnableRootless = state; quartzEnableRootless = state;
xp_disable_update();
/* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */ /* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */
QuartzUpdateScreens(); QuartzUpdateScreens();
if (!quartzEnableRootless && !quartzHasRoot) { if (!quartzEnableRootless && !quartzHasRoot) {
xp_disable_update();
RootlessHideAllWindows(); RootlessHideAllWindows();
xp_reenable_update();
} else if (quartzEnableRootless && !quartzHasRoot) { } else if (quartzEnableRootless && !quartzHasRoot) {
xp_disable_update();
RootlessShowAllWindows(); RootlessShowAllWindows();
xp_reenable_update();
} }
xp_reenable_update();
} }
/* /*