diff options
author | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-07-25 19:39:46 +0000 |
commit | 4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05 (patch) | |
tree | c1e02b9d3509aa97703aa4b540d4cd22ec4600ed /xorg-server/hw/xquartz/xpr/xprAppleWM.c | |
parent | dc3c299dd0995549e2a6973ca0f25b254afd38a5 (diff) | |
download | vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.gz vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.tar.bz2 vcxsrv-4a3dbb926ae3f5410198d7cc4f4ebe4f62eebf05.zip |
Added xorg-server-1.6.2.tar.gz
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; |