diff options
Diffstat (limited to 'miext')
-rw-r--r-- | miext/rootless/rootless.h | 4 | ||||
-rw-r--r-- | miext/rootless/rootlessWindow.c | 26 |
2 files changed, 30 insertions, 0 deletions
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h index f83defeb6..d9fdb6adb 100644 --- a/miext/rootless/rootless.h +++ b/miext/rootless/rootless.h @@ -432,4 +432,8 @@ void RootlessUpdateScreenPixmap(ScreenPtr pScreen); */ void RootlessRepositionWindows(ScreenPtr pScreen); +/* + * Bring all windows to the front of the Aqua stack + */ +void RootlessOrderAllWindows (void); #endif /* _ROOTLESS_H */ diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index f7126590b..4a3c0f6ae 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -1376,3 +1376,29 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) RL_DEBUG_MSG("change border width end\n"); } + +/* + * RootlessOrderAllWindows + * Brings all X11 windows to the top of the window stack + * (i.e in front of Aqua windows) -- called when X11.app is given focus + */ +void +RootlessOrderAllWindows (void) +{ + int i; + WindowPtr pWin; + + RL_DEBUG_MSG("RootlessOrderAllWindows() "); + for (i = 0; i < screenInfo.numScreens; i++) { + if (screenInfo.screens[i] == NULL) continue; + pWin = WindowTable[i]; + if (pWin == NULL) continue; + + for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { + if (!pWin->realized) continue; + if (RootlessEnsureFrame(pWin) == NULL) continue; + RootlessReorderWindow (pWin); + } + } + RL_DEBUG_MSG("RootlessOrderAllWindows() done"); +} |