xserver: Branch 'xorg-server-1.4-apple' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Fri Oct 31 15:10:55 PDT 2008
hw/xquartz/quartz.c | 8 +++++++-
hw/xquartz/xpr/xprScreen.c | 10 +++++-----
miext/rootless/rootlessWindow.c | 9 +--------
3 files changed, 13 insertions(+), 14 deletions(-)
New commits:
commit c883a78ef0c2e7e29437881db85d3815a89ab874
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Oct 31 15:10:34 2008 -0700
XQuartz: displayScreenBounds uses quartzEnableRootless rather than !quartzHasRoot
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index fe87ebb..a2cccd6 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -282,9 +282,12 @@ static void QuartzUpdateScreens(void) {
pRoot = WindowTable[pScreen->myNum];
AppleWMSetScreenOrigin(pRoot);
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
+ //pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND);
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
DefineInitialRootWindow(pRoot);
-
+
+ DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y);
+
/* Send an event for the root reconfigure */
e.u.u.type = ConfigureNotify;
e.u.configureNotify.window = pRoot->drawable.id;
@@ -311,6 +314,9 @@ void QuartzDisplayChangedHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev,
}
void QuartzSetFullscreen(Bool state) {
+
+ DEBUG_LOG("QuartzSetFullscreen: state=%d\n", state);
+
if(quartzHasRoot == state)
return;
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c
index 0414655..a4ee303 100644
--- a/hw/xquartz/xpr/xprScreen.c
+++ b/hw/xquartz/xpr/xprScreen.c
@@ -144,7 +144,7 @@ displayAtIndex(int index)
* Return the bounds of a particular display.
*/
static CGRect
-displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
+displayScreenBounds(CGDirectDisplayID id)
{
CGRect frame;
@@ -155,7 +155,7 @@ displayScreenBounds(CGDirectDisplayID id, Bool remove_menubar)
(int)frame.origin.x, (int)frame.origin.y);
/* Remove menubar to help standard X11 window managers. */
- if (remove_menubar && !quartzHasRoot &&
+ if (quartzEnableRootless &&
frame.origin.x == 0 && frame.origin.y == 0) {
frame.origin.y += aquaMenuBarHeight;
frame.size.height -= aquaMenuBarHeight;
@@ -188,7 +188,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
/* Get the union of all screens */
for (i = 0; i < displayCount; i++) {
CGDirectDisplayID dpy = displayList[i];
- frame = displayScreenBounds(dpy, TRUE);
+ frame = displayScreenBounds(dpy);
unionRect = CGRectUnion(unionRect, frame);
}
@@ -206,7 +206,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height)
{
CGDirectDisplayID dpy = displayList[i];
- frame = displayScreenBounds(dpy, TRUE);
+ frame = displayScreenBounds(dpy);
frame.origin.x -= unionRect.origin.x;
frame.origin.y -= unionRect.origin.y;
@@ -332,7 +332,7 @@ xprAddScreen(int index, ScreenPtr pScreen)
dpy = displayAtIndex(index);
- frame = displayScreenBounds(dpy, TRUE);
+ frame = displayScreenBounds(dpy);
dfb->x = frame.origin.x;
dfb->y = frame.origin.y;
commit cece29317269385aa7a0d3047e6f90e6a17d01eb
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Fri Oct 31 14:39:54 2008 -0700
Rootless: Force initialization of static variable before use.
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index e55cb32..10e3842 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -65,7 +65,7 @@ extern int darwinMainScreenX, darwinMainScreenY;
#define DEFINE_ATOM_HELPER(func,atom_name) \
static Atom func (void) { \
- static unsigned int generation; \
+ static unsigned int generation = 0; \
static Atom atom; \
if (generation != serverGeneration) { \
generation = serverGeneration; \
@@ -82,13 +82,6 @@ static Bool no_configure_window;
static Bool windows_hidden;
// TODO - abstract xp functions
-static const int normal_window_levels[AppleWMNumWindowLevels+1] = {
- 0, 3, 4, 5, LONG_MIN + 30, LONG_MIN + 29,
-};
-static const int rooted_window_levels[AppleWMNumWindowLevels+1] = {
- 202, 203, 204, 205, 201, 200
-};
-
static inline int
configure_window (xp_window_id id, unsigned int mask,
const xp_window_changes *values)
More information about the xorg-commit
mailing list