diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-04-09 20:00:37 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2009-04-10 00:48:35 -0700 |
commit | 808fd2c67f303cb721769375b11ce8b90ffc1909 (patch) | |
tree | a026b2c2818026600fd4161bfbb87a27f879d2e6 | |
parent | dfb0d7aefbbdfc0db966e3a84d52f638135d9138 (diff) |
XQuartz: xprSetWindowLevel updated to store the level requested by the WM
(cherry picked from commit c28c2ddc3a8f3c5b9beec396953bb3ac9ee4714b)
-rw-r--r-- | hw/xquartz/xpr/xprAppleWM.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/hw/xquartz/xpr/xprAppleWM.c b/hw/xquartz/xpr/xprAppleWM.c index b13db0637..9c44e20a2 100644 --- a/hw/xquartz/xpr/xprAppleWM.c +++ b/hw/xquartz/xpr/xprAppleWM.c @@ -38,6 +38,7 @@ #include "applewmExt.h" #include "rootless.h" +#include "rootlessCommon.h" #include <Xplugin.h> #include <X11/X.h> #include "quartz.h" @@ -49,13 +50,24 @@ static int xprSetWindowLevel( { xp_window_id wid; xp_window_changes wc; + RootlessWindowRec *winRec; + // AppleWMNumWindowLevels is allowed, but is only set by the server + // for the root window. + if (level < 0 || level >= AppleWMNumWindowLevels) { + return BadValue; + } + wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, TRUE)); if (wid == 0) return BadWindow; RootlessStopDrawing (pWin, FALSE); - + winRec = WINREC(pWin); + + if(!winRec) + return BadWindow; + if(quartzEnableRootless) wc.window_level = normal_window_levels[level]; else @@ -65,6 +77,8 @@ static int xprSetWindowLevel( return BadValue; } + winRec->level = level; + return Success; } |