xserver: Branch 'xorg-server-1.5-apple' - 2 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Mon Apr 21 20:09:04 PDT 2008
dix/dixutils.c | 3 +-
miext/rootless/rootlessWindow.c | 56 ++++++++++++++++++++++------------------
2 files changed, 33 insertions(+), 26 deletions(-)
New commits:
commit f553e4208a9a9e72f43403db0b4ef7500c2739bc
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Apr 21 20:03:08 2008 -0700
Make rootless use dixLookupClient rather than deprecated LookupClient.
(cherry picked from commit 582b5b01f9697b66489ea906a2ecb8bfc5915571)
diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c
index fa395a8..df1d3a8 100644
--- a/miext/rootless/rootlessWindow.c
+++ b/miext/rootless/rootlessWindow.c
@@ -131,32 +131,38 @@ RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
pWin->rootlessUnhittable = winRec->is_offscreen;
}
-void
-RootlessNativeWindowMoved (WindowPtr pWin)
-{
- xp_box bounds;
- int sx, sy;
- XID vlist[2];
- Mask mask;
- RootlessWindowRec *winRec = WINREC(pWin);
-
- if (xp_get_window_bounds ((xp_window_id)winRec->wid, &bounds) != Success) return;
-
- sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX;
- sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
-
- /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
-
- vlist[0] = (INT16) bounds.x1 - sx;
- vlist[1] = (INT16) bounds.y1 - sy;
- mask = CWX | CWY;
-
- /* Don't want to do anything to the physical window (avoids
+void RootlessNativeWindowMoved (WindowPtr pWin) {
+ xp_box bounds;
+ int sx, sy, err;
+ XID vlist[2];
+ Mask mask;
+ ClientPtr client, pClient;
+ RootlessWindowRec *winRec = WINREC(pWin);
+
+ if (xp_get_window_bounds ((xp_window_id)winRec->wid, &bounds) != Success) return;
+
+ sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX;
+ sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
+
+ /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
+
+ vlist[0] = (INT16) bounds.x1 - sx;
+ vlist[1] = (INT16) bounds.y1 - sy;
+ mask = CWX | CWY;
+
+ /* pretend we're the owner of the window! */
+ err = dixLookupClient(&pClient, pWin->drawable.id, NullClient, DixUnknownAccess);
+ if(err != Success) {
+ ErrorF("RootlessNativeWindowMoved(): Failed to lookup window: 0x%x\n", pWin->drawable.id);
+ return;
+ }
+
+ /* Don't want to do anything to the physical window (avoids
notification-response feedback loops) */
-
- no_configure_window = TRUE;
- ConfigureWindow (pWin, mask, vlist, serverClient);
- no_configure_window = FALSE;
+
+ no_configure_window = TRUE;
+ ConfigureWindow (pWin, mask, vlist, client);
+ no_configure_window = FALSE;
}
/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */
commit ce5a5f93990647de85e535734ee6bb430ad591cb
Author: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Mon Apr 21 20:08:05 2008 -0700
Fixed dixLookupClient to work with client=NullClient as it did in the 1.3 branch
(cherry picked from commit e41ccc64702f856e5e09dfa652fe73c14b8a0225)
diff --git a/dix/dixutils.c b/dix/dixutils.c
index aaf5106..22935ce 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -270,7 +270,8 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
*pClient = clients[clientIndex];
return Success;
bad:
- client->errorValue = rid;
+ if(client)
+ client->errorValue = rid;
*pClient = NULL;
return rc;
}
More information about the xorg-commit
mailing list