Make rootless use dixLookupClient rather than deprecated LookupClient.

(cherry picked from commit 582b5b01f9)
This commit is contained in:
Jeremy Huddleston 2008-04-21 20:03:08 -07:00
parent 8822110d7d
commit ba87c25321

View File

@ -131,32 +131,38 @@ RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state)
pWin->rootlessUnhittable = winRec->is_offscreen; pWin->rootlessUnhittable = winRec->is_offscreen;
} }
void void RootlessNativeWindowMoved (WindowPtr pWin) {
RootlessNativeWindowMoved (WindowPtr pWin) xp_box bounds;
{ int sx, sy, err;
xp_box bounds; XID vlist[2];
int sx, sy; Mask mask;
XID vlist[2]; ClientPtr client, pClient;
Mask mask; RootlessWindowRec *winRec = WINREC(pWin);
RootlessWindowRec *winRec = WINREC(pWin);
if (xp_get_window_bounds ((xp_window_id)winRec->wid, &bounds) != Success) return;
if (xp_get_window_bounds ((xp_window_id)winRec->wid, &bounds) != Success) return;
sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX;
sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY;
/* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
/* Fake up a ConfigureWindow packet to resize the window to the current bounds. */
vlist[0] = (INT16) bounds.x1 - sx;
vlist[0] = (INT16) bounds.x1 - sx; vlist[1] = (INT16) bounds.y1 - sy;
vlist[1] = (INT16) bounds.y1 - sy; mask = CWX | CWY;
mask = CWX | CWY;
/* pretend we're the owner of the window! */
/* Don't want to do anything to the physical window (avoids 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) */ notification-response feedback loops) */
no_configure_window = TRUE; no_configure_window = TRUE;
ConfigureWindow (pWin, mask, vlist, serverClient); ConfigureWindow (pWin, mask, vlist, client);
no_configure_window = FALSE; no_configure_window = FALSE;
} }
/* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ /* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */