summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-07-29 14:49:10 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-08-12 20:26:36 -1000
commit4fc4cab98d454afbfd0d2f48548b5b481e8e7c82 (patch)
treeaaf407603a32801553089baf71e935554def808a /miext
parente5bc62a03289f956c54c4699edf47f7ff237b5be (diff)
XQuartz: Make application switching work better for the no-spaces case
We still have the issue with not raising the frontmost window for the case when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is disabled. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'miext')
-rw-r--r--miext/rootless/rootless.h4
-rw-r--r--miext/rootless/rootlessWindow.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 00eac4e8a..dc4213f1e 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -444,7 +444,7 @@ void RootlessUpdateScreenPixmap(ScreenPtr pScreen);
void RootlessRepositionWindows(ScreenPtr pScreen);
/*
- * Bring all windows to the front of the Aqua stack
+ * Bring all windows to the front of the native stack
*/
-void RootlessOrderAllWindows (void);
+void RootlessOrderAllWindows (Bool include_unhitable);
#endif /* _ROOTLESS_H */
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index bef8a2f98..c1c6bdbfd 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -581,10 +581,15 @@ RootlessReorderWindow(WindowPtr pWin)
RootlessStopDrawing(pWin, FALSE);
- /* Find the next window above this one that has a mapped frame. */
+ /* Find the next window above this one that has a mapped frame.
+ * Only include cases where the windows are in the same category of
+ * hittability to ensure offscreen windows dont get restacked
+ * relative to onscreen ones (but that the offscreen ones maintain
+ * their stacking order if they are explicitly asked to Reorder
+ */
newPrevW = pWin->prevSib;
- while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized))
+ while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized || newPrevW->rootlessUnhittable != pWin->rootlessUnhittable))
newPrevW = newPrevW->prevSib;
newPrev = newPrevW != NULL ? WINREC(newPrevW) : NULL;
@@ -1502,7 +1507,7 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width)
* (i.e in front of Aqua windows) -- called when X11.app is given focus
*/
void
-RootlessOrderAllWindows (void)
+RootlessOrderAllWindows (Bool include_unhitable)
{
int i;
WindowPtr pWin;
@@ -1519,6 +1524,7 @@ RootlessOrderAllWindows (void)
for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) {
if (!pWin->realized) continue;
if (RootlessEnsureFrame(pWin) == NULL) continue;
+ if (!include_unhitable && pWin->rootlessUnhittable) continue;
RootlessReorderWindow (pWin);
}
}