From 61ae56f97326c57dda05632ca9f4873238ee18e1 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Wed, 24 Dec 2008 00:39:06 -0800 Subject: XQuartz: Reposition windows when we enter fullscreen to ensure our root window (cherry picked from commit 7617d3659b5481ef85aecc1f936e7dd2662bdfbd) --- hw/xquartz/quartz.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c index 7f302010b..1f0b0048b 100644 --- a/hw/xquartz/quartz.c +++ b/hw/xquartz/quartz.c @@ -324,6 +324,10 @@ void QuartzSetFullscreen(Bool state) { if (quartzHasRoot && !quartzEnableRootless) RootlessShowAllWindows (); + if (quartzHasRoot || quartzEnableRootless) { + RootlessRepositionWindows(screenInfo.screens[0]); + } + /* Somehow the menubar manages to interfere with our event stream * in fullscreen mode, even though it's not visible. */ @@ -341,18 +345,18 @@ void QuartzSetRootless(Bool 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 */ QuartzUpdateScreens(); if (!quartzEnableRootless && !quartzHasRoot) { - xp_disable_update(); RootlessHideAllWindows(); - xp_reenable_update(); } else if (quartzEnableRootless && !quartzHasRoot) { - xp_disable_update(); RootlessShowAllWindows(); - xp_reenable_update(); } + + xp_reenable_update(); } /* -- cgit v1.2.3