XQuartz: Properly set the window level for the root window
(cherry picked from commit bdf9286d1cbfeaaf8eaf03d28091e91ee587ee25)
This commit is contained in:
parent
8d5dcfe215
commit
15146b8637
|
@ -47,4 +47,17 @@ Bool QuartzInitCursor(ScreenPtr pScreen);
|
||||||
void QuartzSuspendXCursor(ScreenPtr pScreen);
|
void QuartzSuspendXCursor(ScreenPtr pScreen);
|
||||||
void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
|
void QuartzResumeXCursor(ScreenPtr pScreen, int x, int y);
|
||||||
|
|
||||||
|
/* This lookup table came straight from the Tiger X11 source. I tried to figure
|
||||||
|
* it out based on CGWindowLevel.h, but I dunno... -JH
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _APPLEWM_SERVER_
|
||||||
|
#include <X11/extensions/applewm.h>
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* XPR_H */
|
#endif /* XPR_H */
|
||||||
|
|
|
@ -43,16 +43,6 @@
|
||||||
#include "quartz.h"
|
#include "quartz.h"
|
||||||
#include "x-hash.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(
|
static int xprSetWindowLevel(
|
||||||
WindowPtr pWin,
|
WindowPtr pWin,
|
||||||
int level)
|
int level)
|
||||||
|
@ -66,8 +56,7 @@ static int xprSetWindowLevel(
|
||||||
|
|
||||||
RootlessStopDrawing (pWin, FALSE);
|
RootlessStopDrawing (pWin, FALSE);
|
||||||
|
|
||||||
//if (WINREC(WindowTable[pWin->drawable.pScreen->myNum]) == NULL)
|
if(quartzEnableRootless)
|
||||||
if (quartzHasRoot)
|
|
||||||
wc.window_level = normal_window_levels[level];
|
wc.window_level = normal_window_levels[level];
|
||||||
else
|
else
|
||||||
wc.window_level = rooted_window_levels[level];
|
wc.window_level = rooted_window_levels[level];
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "dix.h"
|
#include "dix.h"
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
|
#include "quartz.h"
|
||||||
|
|
||||||
#include "threadSafety.h"
|
#include "threadSafety.h"
|
||||||
|
|
||||||
|
@ -161,6 +162,12 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
|
||||||
mask |= XP_SHAPE;
|
mask |= XP_SHAPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(quartzEnableRootless)
|
||||||
|
wc.window_level = normal_window_levels[!IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels];
|
||||||
|
else
|
||||||
|
wc.window_level = rooted_window_levels[!IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels];
|
||||||
|
mask |= XP_WINDOW_LEVEL;
|
||||||
|
|
||||||
err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid);
|
err = xp_create_window(mask, &wc, (xp_window_id *) &pFrame->wid);
|
||||||
|
|
||||||
if (err != Success)
|
if (err != Success)
|
||||||
|
|
|
@ -48,8 +48,6 @@ extern int darwinMainScreenX, darwinMainScreenY;
|
||||||
#endif
|
#endif
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
|
|
||||||
#define AppleWMNumWindowLevels 5
|
|
||||||
|
|
||||||
#include "rootlessCommon.h"
|
#include "rootlessCommon.h"
|
||||||
#include "rootlessWindow.h"
|
#include "rootlessWindow.h"
|
||||||
|
|
||||||
|
@ -105,12 +103,6 @@ current_time_in_seconds (void)
|
||||||
return t;
|
return t;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
static inline Bool
|
|
||||||
rootlessHasRoot (ScreenPtr pScreen)
|
|
||||||
{
|
|
||||||
return WINREC (WindowTable[pScreen->myNum]) != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
|
RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue