diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 20:12:58 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 20:12:58 +0000 |
commit | 2553bdd7c359cd87525d367761c86932cec5adff (patch) | |
tree | ae71245933c98474a699d3e392de5820879b2018 /xorg-server/hw/xquartz/xpr/xprAppleWM.c | |
parent | e2c51f2ee7b0a3ea1a052fc49324057b4a4bbc78 (diff) | |
parent | 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (diff) | |
download | vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.gz vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.tar.bz2 vcxsrv-2553bdd7c359cd87525d367761c86932cec5adff.zip |
svn merge file:///D:/svnrepos/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xquartz/xpr/xprAppleWM.c')
-rw-r--r-- | xorg-server/hw/xquartz/xpr/xprAppleWM.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/xorg-server/hw/xquartz/xpr/xprAppleWM.c b/xorg-server/hw/xquartz/xpr/xprAppleWM.c index bd82df03c..fae9a0422 100644 --- a/xorg-server/hw/xquartz/xpr/xprAppleWM.c +++ b/xorg-server/hw/xquartz/xpr/xprAppleWM.c @@ -32,10 +32,26 @@ #endif #include "xpr.h" + +#define _APPLEWM_SERVER_ +#include <X11/extensions/applewmstr.h> + #include "applewmExt.h" #include "rootless.h" -#include "Xplugin.h" +#include <Xplugin.h> #include <X11/X.h> +#include "quartz.h" +#include "x-hash.h" + +/* This lookup table came straight from the Tiger X11 source. I tried to figure + * it out based on CGWindowLevel.h, but I dunno... -JH + */ +static const int normal_window_levels[AppleWMNumWindowLevels+1] = { +0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29, +}; +static const int rooted_window_levels[AppleWMNumWindowLevels+1] = { +202, 203, 204, 205, 201, 200 +}; static int xprSetWindowLevel( WindowPtr pWin, @@ -44,13 +60,18 @@ static int xprSetWindowLevel( xp_window_id wid; xp_window_changes wc; - wid = (xp_window_id) RootlessFrameForWindow (pWin, TRUE); + wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, TRUE)); if (wid == 0) return BadWindow; RootlessStopDrawing (pWin, FALSE); - wc.window_level = level; + //if (WINREC(WindowTable[pWin->drawable.pScreen->myNum]) == NULL) + if (quartzHasRoot) + wc.window_level = normal_window_levels[level]; + else + wc.window_level = rooted_window_levels[level]; + if (xp_configure_window (wid, XP_WINDOW_LEVEL, &wc) != Success) { return BadValue; } @@ -70,7 +91,7 @@ static int xprFrameDraw( { xp_window_id wid; - wid = (xp_window_id) RootlessFrameForWindow (pWin, FALSE); + wid = x_cvt_vptr_to_uint(RootlessFrameForWindow (pWin, FALSE)); if (wid == 0) return BadWindow; |