summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xquartz/xpr/xprFrame.c34
-rw-r--r--miext/rootless/rootless.h1
-rw-r--r--miext/rootless/rootlessWindow.c1
3 files changed, 24 insertions, 12 deletions
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index ba697ac62..6635f08d8 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -162,10 +162,12 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
mask |= XP_SHAPE;
}
+ pFrame->level = !IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels;
+
if(quartzEnableRootless)
- wc.window_level = normal_window_levels[!IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels];
+ wc.window_level = normal_window_levels[pFrame->level];
else
- wc.window_level = rooted_window_levels[!IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels];
+ wc.window_level = rooted_window_levels[pFrame->level];
mask |= XP_WINDOW_LEVEL;
err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid);
@@ -252,28 +254,36 @@ xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen,
/*
* Change frame stacking.
*/
-static void
-xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid)
-{
+static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) {
xp_window_changes wc;
+ unsigned int mask = XP_STACKING;
TA_SERVER();
- /* Stack frame below nextWid it if it exists, or raise
+ /* Stack frame below nextWid it if it exists, or raise
frame above everything otherwise. */
- if (nextWid == NULL)
- {
+ if(nextWid == NULL) {
wc.stack_mode = XP_MAPPED_ABOVE;
wc.sibling = 0;
- }
- else
- {
+ } else {
wc.stack_mode = XP_MAPPED_BELOW;
wc.sibling = x_cvt_vptr_to_uint(nextWid);
}
- xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc);
+ if(window_hash) {
+ RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr((xp_window_id)wid), NULL);
+
+ if(winRec) {
+ if(quartzEnableRootless)
+ wc.window_level = normal_window_levels[winRec->level];
+ else
+ wc.window_level = rooted_window_levels[winRec->level];
+ mask |= XP_WINDOW_LEVEL;
+ }
+ }
+
+ xprConfigureWindow(x_cvt_vptr_to_uint(wid), mask, &wc);
}
diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h
index 5224dca2b..bde4cff52 100644
--- a/miext/rootless/rootless.h
+++ b/miext/rootless/rootless.h
@@ -57,6 +57,7 @@ typedef struct _RootlessWindowRec {
int x, y;
unsigned int width, height;
unsigned int borderWidth;
+ int level;
RootlessFrameID wid; // implementation specific frame id
WindowPtr win; // underlying X window
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index 7bd7f18bb..b173cef70 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -478,6 +478,7 @@ RootlessEnsureFrame(WindowPtr pWin)
winRec->is_reorder_pending = FALSE;
winRec->pixmap = NULL;
winRec->wid = NULL;
+ winRec->level = 0;
SETWINREC(pWin, winRec);