Commit b1efdd94 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Screen.c: fix indentation in nxagentMaximizeToFullScreen

parent f1e543b0
...@@ -341,7 +341,7 @@ void nxagentMaximizeToFullScreen(ScreenPtr pScreen) ...@@ -341,7 +341,7 @@ void nxagentMaximizeToFullScreen(ScreenPtr pScreen)
XUnmapWindow(nxagentDisplay, nxagentIconWindow); XUnmapWindow(nxagentDisplay, nxagentIconWindow);
*/ */
Window root = RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)); Window root = RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay));
/* /*
FIXME: We'll check for ReparentNotify and LeaveNotify events after FIXME: We'll check for ReparentNotify and LeaveNotify events after
...@@ -351,55 +351,55 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after ...@@ -351,55 +351,55 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after
unnecessary. unnecessary.
*/ */
/* only reparent if necessary. FIXME: also check if the desired coordinates match */ /* only reparent if necessary. FIXME: also check if the desired coordinates match */
if (!nxagentIsParentOf(nxagentDisplay, root, nxagentFullscreenWindow)) if (!nxagentIsParentOf(nxagentDisplay, root, nxagentFullscreenWindow))
{ {
XReparentWindow(nxagentDisplay, nxagentFullscreenWindow, XReparentWindow(nxagentDisplay, nxagentFullscreenWindow,
root, 0, 0); root, 0, 0);
for (int i = 0; i < 100 && nxagentWMIsRunning; i++) for (int i = 0; i < 100 && nxagentWMIsRunning; i++)
{ {
XEvent e; XEvent e;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentMaximizeToFullscreen: WARNING! Going to wait for the ReparentNotify event [%d].\n", i); fprintf(stderr, "nxagentMaximizeToFullscreen: WARNING! Going to wait for the ReparentNotify event [%d].\n", i);
#endif #endif
if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e)) if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e))
{ {
break; break;
} }
XSync(nxagentDisplay, 0); XSync(nxagentDisplay, 0);
nxagentWaitEvents(nxagentDisplay, 50); nxagentWaitEvents(nxagentDisplay, 50);
}
}
else
{
#ifdef TEST
fprintf(stderr, "%s: FullscreenWindow already is child of root window - skipping reparenting,\n", __func__);
#endif
} }
}
else
{
#ifdef TEST
fprintf(stderr, "%s: FullscreenWindow already is child of root window - skipping reparenting,\n", __func__);
#endif
}
XMapRaised(nxagentDisplay, nxagentFullscreenWindow); XMapRaised(nxagentDisplay, nxagentFullscreenWindow);
XIconifyWindow(nxagentDisplay, nxagentIconWindow, XIconifyWindow(nxagentDisplay, nxagentIconWindow,
DefaultScreen(nxagentDisplay)); DefaultScreen(nxagentDisplay));
/* swallow all LeaveNotify events for the FullscreenWindow; /* swallow all LeaveNotify events for the FullscreenWindow;
Normally this does not swallow anything these days, but when Normally this does not swallow anything these days, but when
using fvwm you see one of these events here. */ using fvwm you see one of these events here. */
while (1) while (1)
{ {
XEvent e; XEvent e;
if (!XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, LeaveNotify, &e)) if (!XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, LeaveNotify, &e))
break; break;
#ifdef TEST #ifdef TEST
fprintf(stderr, "%s: swallowing LeaveNotify event\n", __func__); fprintf(stderr, "%s: swallowing LeaveNotify event\n", __func__);
#endif #endif
} }
/* /*
XMapWindow(nxagentDisplay, nxagentIconWindow); XMapWindow(nxagentDisplay, nxagentIconWindow);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment