diff options
author | Dave Airlie <airlied@redhat.com> | 2011-03-28 12:50:06 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-03-28 12:50:06 +1000 |
commit | aa2bc5ee9710a10eeffc55709df1fccdce826435 (patch) | |
tree | 732d319495f14eca1de6eecc97513e359bd4d213 | |
parent | e5749b9867a58bf75288ea6012120b17961508df (diff) |
xserver: replace WindowPtr with ProtocolWindowPtr
This attempts to use ProtocolWindowPtr everywhere correctly
instead of WindowPtr.
Need to start thinking about stuff going across the scrn boundary
80 files changed, 876 insertions, 874 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 00afe94f1..058bef68a 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -199,7 +199,7 @@ XineramaValidateGC( ){ Xinerama_GC_FUNC_PROLOGUE (pGC); - if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) { + if((pDraw->type == DRAWABLE_WINDOW) && !(((ProtocolWindowPtr)pDraw)->parent)) { /* the root window */ int x_off = pGC->pScreen->x; int y_off = pGC->pScreen->y; @@ -931,7 +931,7 @@ int ProcPanoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xPanoramiXGetStateReply rep; int n, rc; @@ -959,7 +959,7 @@ int ProcPanoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xPanoramiXGetScreenCountReply rep; int n, rc; @@ -986,7 +986,7 @@ int ProcPanoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xPanoramiXGetScreenSizeReply rep; int n, rc; diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 9ea461173..7cd8cd0a9 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -439,7 +439,7 @@ int PanoramiXConfigureWindow(ClientPtr client) { PanoramiXRes *win; PanoramiXRes *sib = NULL; - WindowPtr pWin; + ProtocolWindowPtr pWin; int result, j, len, sib_offset = 0, x = 0, y = 0; int x_offset = -1; int y_offset = -1; @@ -557,7 +557,7 @@ int PanoramiXGetGeometry(ClientPtr client) } else if (WindowDrawable(pDraw->type)) { - WindowPtr pWin = (WindowPtr)pDraw; + ProtocolWindowPtr pWin = (ProtocolWindowPtr)pDraw; rep.x = pWin->origin.x - wBorderWidth (pWin); rep.y = pWin->origin.y - wBorderWidth (pWin); if((pWin->parent == screenInfo.screens[0]->root) || @@ -578,7 +578,7 @@ int PanoramiXTranslateCoords(ClientPtr client) INT16 x, y; REQUEST(xTranslateCoordsReq); int rc; - WindowPtr pWin, pDst; + ProtocolWindowPtr pWin, pDst; xTranslateCoordsReply rep; REQUEST_SIZE_MATCH(xTranslateCoordsReq); @@ -624,7 +624,7 @@ int PanoramiXTranslateCoords(ClientPtr client) ) { rep.child = pWin->drawable.id; - pWin = (WindowPtr) NULL; + pWin = (ProtocolWindowPtr) NULL; } else pWin = pWin->nextSib; @@ -1808,7 +1808,7 @@ int PanoramiXGetImage(ClientPtr client) if (rc != Success) return rc; - if(!((WindowPtr)pDraw)->realized) + if(!((ProtocolWindowPtr)pDraw)->realized) return BadMatch; x = stuff->x; @@ -1832,10 +1832,10 @@ int PanoramiXGetImage(ClientPtr client) screenInfo.screens[0]->y + pDraw->y + y < 0 || screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || /* check for being inside of border */ - x < - wBorderWidth((WindowPtr)pDraw) || - x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || - y < -wBorderWidth((WindowPtr)pDraw) || - y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height) + x < - wBorderWidth((ProtocolWindowPtr)pDraw) || + x + w > wBorderWidth((ProtocolWindowPtr)pDraw) + (int)pDraw->width || + y < -wBorderWidth((ProtocolWindowPtr)pDraw) || + y + h > wBorderWidth ((ProtocolWindowPtr)pDraw) + (int)pDraw->height) return BadMatch; } @@ -1847,7 +1847,7 @@ int PanoramiXGetImage(ClientPtr client) return rc; } - xgi.visual = wVisual (((WindowPtr) pDraw)); + xgi.visual = wVisual (((ProtocolWindowPtr) pDraw)); xgi.type = X_Reply; xgi.sequenceNumber = client->sequence; xgi.depth = pDraw->depth; diff --git a/Xext/saver.c b/Xext/saver.c index 18886038a..23a53dec5 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -500,7 +500,7 @@ CreateSaverWindow (ScreenPtr pScreen) SetupScreen (pScreen); ScreenSaverStuffPtr pSaver; ScreenSaverAttrPtr pAttr; - WindowPtr pWin; + ProtocolWindowPtr pWin; int result; unsigned long mask; Colormap *installedMaps; @@ -512,7 +512,7 @@ CreateSaverWindow (ScreenPtr pScreen) pSaver = &pScreen->screensaver; if (pSaver->pWindow) { - pSaver->pWindow = NullWindow; + pSaver->pWindow = NullProtocolWindow; FreeResource (pSaver->wid, RT_NONE); if (pPriv) { @@ -574,7 +574,7 @@ CreateSaverWindow (ScreenPtr pScreen) mask |= CWCursor; } if (mask) - (*pScreen->ChangeWindowAttributes) (pWin, mask); + (*pScreen->ChangeWindowAttributes) ((WindowPtr)pWin, mask); if (pAttr->colormap != None) (void) ChangeWindowAttributes (pWin, CWColormap, &pAttr->colormap, @@ -625,7 +625,7 @@ DestroySaverWindow (ScreenPtr pScreen) pSaver = &pScreen->screensaver; if (pSaver->pWindow) { - pSaver->pWindow = NullWindow; + pSaver->pWindow = NullProtocolWindow; FreeResource (pSaver->wid, RT_NONE); } pPriv->hasWindow = FALSE; @@ -789,7 +789,7 @@ ScreenSaverSetAttributes (ClientPtr client) { REQUEST(xScreenSaverSetAttributesReq); DrawablePtr pDraw; - WindowPtr pParent; + ProtocolWindowPtr pParent; ScreenPtr pScreen; ScreenSaverScreenPrivatePtr pPriv = 0; ScreenSaverAttrPtr pAttr = 0; diff --git a/Xext/shape.c b/Xext/shape.c index 115fc07ed..75c7f280b 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -48,7 +48,7 @@ in this Software without prior written authorization from The Open Group. #include "protocol-versions.h" typedef RegionPtr (*CreateDftPtr)( - WindowPtr /* pWin */ + ProtocolWindowPtr /* pWin */ ); static int ShapeFreeClient( @@ -90,7 +90,7 @@ typedef struct _ShapeEvent *ShapeEventPtr; typedef struct _ShapeEvent { ShapeEventPtr next; ClientPtr client; - WindowPtr window; + ProtocolWindowPtr window; XID clientResource; } ShapeEventRec; @@ -105,7 +105,7 @@ typedef struct _ShapeEvent { static int RegionOperate ( ClientPtr client, - WindowPtr pWin, + ProtocolWindowPtr pWin, int kind, RegionPtr *destRgnp, RegionPtr srcRgn, @@ -181,13 +181,13 @@ RegionOperate ( } if (srcRgn) RegionDestroy(srcRgn); - (*pWin->drawable.pScreen->SetShape) (pWin, kind); + (*pWin->drawable.pScreen->SetShape) ((WindowPtr)pWin, kind); SendShapeNotify (pWin, kind); return Success; } RegionPtr -CreateBoundingShape (WindowPtr pWin) +CreateBoundingShape (ProtocolWindowPtr pWin) { BoxRec extents; @@ -199,7 +199,7 @@ CreateBoundingShape (WindowPtr pWin) } RegionPtr -CreateClipShape (WindowPtr pWin) +CreateClipShape (ProtocolWindowPtr pWin) { BoxRec extents; @@ -241,7 +241,7 @@ ProcShapeQueryVersion (ClientPtr client) static int ProcShapeRectangles (ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xShapeRectanglesReq); xRectangle *prects; int nrects, ctype, rc; @@ -339,7 +339,7 @@ ProcPanoramiXShapeRectangles( static int ProcShapeMask (ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; REQUEST(xShapeMaskReq); RegionPtr srcRgn; @@ -447,7 +447,7 @@ ProcPanoramiXShapeMask( static int ProcShapeCombine (ClientPtr client) { - WindowPtr pSrcWin, pDestWin; + ProtocolWindowPtr pSrcWin, pDestWin; REQUEST(xShapeCombineReq); RegionPtr srcRgn; RegionPtr *destRgn; @@ -570,7 +570,7 @@ ProcPanoramiXShapeCombine( static int ProcShapeOffset (ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xShapeOffsetReq); RegionPtr srcRgn; int rc; @@ -597,7 +597,7 @@ ProcShapeOffset (ClientPtr client) if (srcRgn) { RegionTranslate(srcRgn, stuff->xOff, stuff->yOff); - (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); + (*pWin->drawable.pScreen->SetShape) ((WindowPtr)pWin, stuff->destKind); } SendShapeNotify (pWin, (int)stuff->destKind); return Success; @@ -634,7 +634,7 @@ static int ProcShapeQueryExtents (ClientPtr client) { REQUEST(xShapeQueryExtentsReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xShapeQueryExtentsReply rep; BoxRec extents, *pExtents; int n, rc; @@ -699,7 +699,7 @@ static int ShapeFreeClient (pointer data, XID id) { ShapeEventPtr pShapeEvent; - WindowPtr pWin; + ProtocolWindowPtr pWin; ShapeEventPtr *pHead, pCur, pPrev; int rc; @@ -743,7 +743,7 @@ static int ProcShapeSelectInput (ClientPtr client) { REQUEST(xShapeSelectInputReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; ShapeEventPtr pShapeEvent, pNewShapeEvent, *pHead; XID clientResource; int rc; @@ -837,7 +837,7 @@ ProcShapeSelectInput (ClientPtr client) */ void -SendShapeNotify (WindowPtr pWin, int which) +SendShapeNotify (ProtocolWindowPtr pWin, int which) { ShapeEventPtr *pHead, pShapeEvent; xShapeNotifyEvent se; @@ -911,7 +911,7 @@ static int ProcShapeInputSelected (ClientPtr client) { REQUEST(xShapeInputSelectedReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; ShapeEventPtr pShapeEvent, *pHead; int enabled, rc; xShapeInputSelectedReply rep; @@ -953,7 +953,7 @@ static int ProcShapeGetRectangles (ClientPtr client) { REQUEST(xShapeGetRectanglesReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xShapeGetRectanglesReply rep; xRectangle *rects; int nrects, i, rc; diff --git a/Xext/shm.c b/Xext/shm.c index b08af821b..b89255454 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -651,22 +651,22 @@ ProcShmGetImage(ClientPtr client) if (pDraw->type == DRAWABLE_WINDOW) { if( /* check for being viewable */ - !((WindowPtr) pDraw)->realized || + !((ProtocolWindowPtr) pDraw)->realized || /* check for being on screen */ pDraw->x + stuff->x < 0 || pDraw->x + stuff->x + (int)stuff->width > pDraw->pScreen->width || pDraw->y + stuff->y < 0 || pDraw->y + stuff->y + (int)stuff->height > pDraw->pScreen->height || /* check for being inside of border */ - stuff->x < - wBorderWidth((WindowPtr)pDraw) || + stuff->x < - wBorderWidth((ProtocolWindowPtr)pDraw) || stuff->x + (int)stuff->width > - wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || - stuff->y < -wBorderWidth((WindowPtr)pDraw) || + wBorderWidth((ProtocolWindowPtr)pDraw) + (int)pDraw->width || + stuff->y < -wBorderWidth((ProtocolWindowPtr)pDraw) || stuff->y + (int)stuff->height > - wBorderWidth((WindowPtr)pDraw) + (int)pDraw->height + wBorderWidth((ProtocolWindowPtr)pDraw) + (int)pDraw->height ) return BadMatch; - xgi.visual = wVisual(((WindowPtr)pDraw)); + xgi.visual = wVisual(((ProtocolWindowPtr)pDraw)); } else { @@ -836,10 +836,10 @@ ProcPanoramiXShmGetImage(ClientPtr client) screenInfo.screens[0]->y + pDraw->y + y < 0 || screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || /* check for being inside of border */ - x < - wBorderWidth((WindowPtr)pDraw) || - x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || - y < -wBorderWidth((WindowPtr)pDraw) || - y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height) + x < - wBorderWidth((ProtocolWindowPtr)pDraw) || + x + w > wBorderWidth((ProtocolWindowPtr)pDraw) + (int)pDraw->width || + y < -wBorderWidth((ProtocolWindowPtr)pDraw) || + y + h > wBorderWidth ((ProtocolWindowPtr)pDraw) + (int)pDraw->height) return BadMatch; } @@ -858,7 +858,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) } } - xgi.visual = wVisual(((WindowPtr)pDraw)); + xgi.visual = wVisual(((ProtocolWindowPtr)pDraw)); xgi.type = X_Reply; xgi.length = 0; xgi.sequenceNumber = client->sequence; diff --git a/Xext/xace.c b/Xext/xace.c index c757cad05..58861a710 100644 --- a/Xext/xace.c +++ b/Xext/xace.c @@ -60,7 +60,7 @@ int XaceHookDispatch(ClientPtr client, int major) } } -int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, +int XaceHookPropertyAccess(ClientPtr client, ProtocolWindowPtr pWin, PropertyPtr *ppProp, Mask access_mode) { XacePropertyAccessRec rec = { client, pWin, ppProp, access_mode, Success }; @@ -131,7 +131,7 @@ int XaceHook(int hook, ...) case XACE_SEND_ACCESS: u.send.client = va_arg(ap, ClientPtr); u.send.dev = va_arg(ap, DeviceIntPtr); - u.send.pWin = va_arg(ap, WindowPtr); + u.send.pWin = va_arg(ap, ProtocolWindowPtr); u.send.events = va_arg(ap, xEventPtr); u.send.count = va_arg(ap, int); u.send.status = Success; /* default allow */ @@ -139,7 +139,7 @@ int XaceHook(int hook, ...) break; case XACE_RECEIVE_ACCESS: u.recv.client = va_arg(ap, ClientPtr); - u.recv.pWin = va_arg(ap, WindowPtr); + u.recv.pWin = va_arg(ap, ProtocolWindowPtr); u.recv.events = va_arg(ap, xEventPtr); u.recv.count = va_arg(ap, int); u.recv.status = Success; /* default allow */ diff --git a/Xext/xace.h b/Xext/xace.h index 6029d87d8..3586e5f4a 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -69,7 +69,7 @@ extern _X_EXPORT int XaceHook( /* Special-cased hook functions */ extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major); -extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, +extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, ProtocolWindowPtr pWin, PropertyPtr *ppProp, Mask access_mode); extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection **ppSel, Mask access_mode); diff --git a/Xext/xacestr.h b/Xext/xacestr.h index 84216c8c0..ce65b31af 100644 --- a/Xext/xacestr.h +++ b/Xext/xacestr.h @@ -58,7 +58,7 @@ typedef struct { /* XACE_PROPERTY_ACCESS */ typedef struct { ClientPtr client; - WindowPtr pWin; + ProtocolWindowPtr pWin; PropertyPtr *ppProp; Mask access_mode; int status; @@ -68,7 +68,7 @@ typedef struct { typedef struct { ClientPtr client; DeviceIntPtr dev; - WindowPtr pWin; + ProtocolWindowPtr pWin; xEventPtr events; int count; int status; @@ -77,7 +77,7 @@ typedef struct { /* XACE_RECEIVE_ACCESS */ typedef struct { ClientPtr client; - WindowPtr pWin; + ProtocolWindowPtr pWin; xEventPtr events; int count; int status; diff --git a/Xext/xtest.c b/Xext/xtest.c index b26bc3387..f8e055161 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -111,7 +111,7 @@ ProcXTestCompareCursor(ClientPtr client) { REQUEST(xXTestCompareCursorReq); xXTestCompareCursorReply rep; - WindowPtr pWin; + ProtocolWindowPtr pWin; CursorPtr pCursor; int n, rc; DeviceIntPtr ptr = PickPointer(client); @@ -151,7 +151,7 @@ ProcXTestFakeInput(ClientPtr client) int nev, n, type, rc; xEvent *ev; DeviceIntPtr dev = NULL; - WindowPtr root; + ProtocolWindowPtr root; Bool extension = FALSE; deviceValuator *dv = NULL; ValuatorMask mask; diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index b96843159..229773fee 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -380,7 +380,7 @@ ProcXvQueryAdaptors(ClientPtr client) int nameSize; XvAdaptorPtr pa; XvFormatPtr pf; - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; XvScreenPtr pxvs; diff --git a/Xi/chgprop.c b/Xi/chgprop.c index d24a24638..0abb67c75 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -97,7 +97,7 @@ int ProcXChangeDeviceDontPropagateList(ClientPtr client) { int i, rc; - WindowPtr pWin; + ProtocolWindowPtr pWin; struct tmask tmp[EMASKSIZE]; OtherInputMasks *others; diff --git a/Xi/closedev.c b/Xi/closedev.c index 1064be67b..2c09ed080 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -89,7 +89,7 @@ SProcXCloseDevice(ClientPtr client) */ static void -DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) +DeleteDeviceEvents(DeviceIntPtr dev, ProtocolWindowPtr pWin, ClientPtr client) { InputClientsPtr others; OtherInputMasks *pOthers; @@ -116,9 +116,9 @@ DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) */ static void -DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) +DeleteEventsFromChildren(DeviceIntPtr dev, ProtocolWindowPtr p1, ClientPtr client) { - WindowPtr p2; + ProtocolWindowPtr p2; while (p1) { p2 = p1->firstChild; @@ -138,7 +138,7 @@ int ProcXCloseDevice(ClientPtr client) { int rc, i; - WindowPtr pWin, p1; + ProtocolWindowPtr pWin, p1; DeviceIntPtr d; REQUEST(xCloseDeviceReq); diff --git a/Xi/exevents.c b/Xi/exevents.c index c7089bb69..953a67b68 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -88,10 +88,10 @@ SOFTWARE. #define AllButtonsMask ( \ Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) -Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , +Bool ShouldFreeInputMasks(ProtocolWindowPtr /* pWin */ , Bool /* ignoreSelectedEvents */ ); -static Bool MakeInputMasks(WindowPtr /* pWin */ +static Bool MakeInputMasks(ProtocolWindowPtr /* pWin */ ); /* @@ -459,7 +459,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->focus) { - WindowPtr *oldTrace; + ProtocolWindowPtr *oldTrace; classes = to->unused_classes; to->focus = classes->focus; @@ -474,11 +474,11 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) oldTrace = to->focus->trace; memcpy(to->focus, from->focus, sizeof(FocusClassRec)); to->focus->trace = realloc(oldTrace, - to->focus->traceSize * sizeof(WindowPtr)); + to->focus->traceSize * sizeof(ProtocolWindowPtr)); if (!to->focus->trace && to->focus->traceSize) FatalError("[Xi] no memory for trace.\n"); memcpy(to->focus->trace, from->focus->trace, - from->focus->traceSize * sizeof(WindowPtr)); + from->focus->traceSize * sizeof(ProtocolWindowPtr)); to->focus->sourceid = from->id; } } else if (to->focus) @@ -819,7 +819,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) return DONT_PROCESS; if (device->valuator) - device->valuator->motionHintWindow = NullWindow; + device->valuator->motionHintWindow = NullProtocolWindow; set_key_down(device, key, KEY_PROCESSED); } else if (event->type == ET_KeyRelease) { if (!k) @@ -828,7 +828,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) if (!key_is_down(device, key, KEY_PROCESSED)) /* guard against duplicates */ return DONT_PROCESS; if (device->valuator) - device->valuator->motionHintWindow = NullWindow; + device->valuator->motionHintWindow = NullProtocolWindow; set_key_up(device, key, KEY_PROCESSED); } else if (event->type == ET_ButtonPress) { Mask mask; @@ -840,7 +840,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) set_button_down(device, key, BUTTON_PROCESSED); if (device->valuator) - device->valuator->motionHintWindow = NullWindow; + device->valuator->motionHintWindow = NullProtocolWindow; if (!b->map[key]) return DONT_PROCESS; b->buttonsDown++; @@ -881,7 +881,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) } set_button_up(device, key, BUTTON_PROCESSED); if (device->valuator) - device->valuator->motionHintWindow = NullWindow; + device->valuator->motionHintWindow = NullProtocolWindow; if (!b->map[key]) return DONT_PROCESS; if (b->buttonsDown >= 1 && !--b->buttonsDown) @@ -1098,7 +1098,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) GetSpriteWindow(device)); else DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent*)event, - NullGrab, NullWindow, device); + NullGrab, NullProtocolWindow, device); if (deactivateDeviceGrab == TRUE) (*device->deviceGrab.DeactivateGrab) (device); @@ -1217,7 +1217,7 @@ FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v, void DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, - WindowPtr pWin) + ProtocolWindowPtr pWin) { deviceFocus event; xXIFocusInEvent *xi2event; @@ -1421,7 +1421,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int button, GrabParameters *param, GrabType grabtype, GrabMask *mask) { - WindowPtr pWin, confineTo; + ProtocolWindowPtr pWin, confineTo; CursorPtr cursor; GrabPtr grab; int rc, type = -1; @@ -1431,7 +1431,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, if (rc != Success) return rc; if (param->confineTo == None) - confineTo = NullWindow; + confineTo = NullProtocolWindow; else { rc = dixLookupWindow(&confineTo, param->confineTo, client, DixSetAttrAccess); if (rc != Success) @@ -1478,7 +1478,7 @@ int GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int key, GrabParameters *param, GrabType grabtype, GrabMask *mask) { - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabPtr grab; KeyClassPtr k = dev->key; Mask access_mode = DixGrabAccess; @@ -1522,7 +1522,7 @@ int GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, GrabParameters *param, GrabMask *mask) { - WindowPtr pWin; + ProtocolWindowPtr pWin; CursorPtr cursor; GrabPtr grab; Mask access_mode = DixGrabAccess; @@ -1564,7 +1564,7 @@ GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, } int -SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, +SelectForWindow(DeviceIntPtr dev, ProtocolWindowPtr pWin, ClientPtr client, Mask mask, Mask exclusivemasks) { int mskidx = dev->id; @@ -1615,13 +1615,13 @@ SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, if ((dev->valuator->motionHintWindow == pWin) && (mask & DevicePointerMotionHintMask) && !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab) - dev->valuator->motionHintWindow = NullWindow; + dev->valuator->motionHintWindow = NullProtocolWindow; RecalculateDeviceDeliverableEvents(pWin); return Success; } int -AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx) +AddExtensionClient(ProtocolWindowPtr pWin, ClientPtr client, Mask mask, int mskidx) { InputClientsPtr others; @@ -1642,7 +1642,7 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx) } static Bool -MakeInputMasks(WindowPtr pWin) +MakeInputMasks(ProtocolWindowPtr pWin) { struct _OtherInputMasks *imasks; @@ -1654,11 +1654,11 @@ MakeInputMasks(WindowPtr pWin) } void -RecalculateDeviceDeliverableEvents(WindowPtr pWin) +RecalculateDeviceDeliverableEvents(ProtocolWindowPtr pWin) { InputClientsPtr others; struct _OtherInputMasks *inputMasks; /* default: NULL */ - WindowPtr pChild, tmp; + ProtocolWindowPtr pChild, tmp; int i, j; pChild = pWin; @@ -1697,7 +1697,7 @@ RecalculateDeviceDeliverableEvents(WindowPtr pWin) } int -InputClientGone(WindowPtr pWin, XID id) +InputClientGone(ProtocolWindowPtr pWin, XID id) { InputClientsPtr other, prev; @@ -1739,14 +1739,14 @@ int SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, xEvent * ev, Mask mask, int count) { - WindowPtr pWin; - WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ - WindowPtr spriteWin = GetSpriteWindow(d); + ProtocolWindowPtr pWin; + ProtocolWindowPtr effectiveFocus = NullProtocolWindow; /* only set if dest==InputFocus */ + ProtocolWindowPtr spriteWin = GetSpriteWindow(d); if (dest == PointerWindow) pWin = spriteWin; else if (dest == InputFocus) { - WindowPtr inputFocus; + ProtocolWindowPtr inputFocus; if (!d->focus) inputFocus = spriteWin; @@ -1855,9 +1855,9 @@ ChangeKeyMapping(ClientPtr client, } static void -DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) +DeleteDeviceFromAnyExtEvents(ProtocolWindowPtr pWin, DeviceIntPtr dev) { - WindowPtr parent; + ProtocolWindowPtr parent; /* Deactivate any grabs performed on this window, before making * any input focus changes. @@ -1869,7 +1869,7 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) /* If the focus window is a root window (ie. has no parent) * then don't delete the focus from it. */ - if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) { + if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullProtocolWindow)) { int focusEventMode = NotifyNormal; /* If a grab is in progress, then alter the mode of focus events. */ @@ -1925,11 +1925,11 @@ DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) if (dev->valuator) if (dev->valuator->motionHintWindow == pWin) - dev->valuator->motionHintWindow = NullWindow; + dev->valuator->motionHintWindow = NullProtocolWindow; } void -DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources) +DeleteWindowFromAnyExtEvents(ProtocolWindowPtr pWin, Bool freeResources) { int i; DeviceIntPtr dev; @@ -1976,7 +1976,7 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask) } void -CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, +CheckDeviceGrabAndHintWindow(ProtocolWindowPtr pWin, int type, deviceKeyButtonPointer * xE, GrabPtr grab, ClientPtr client, Mask deliveryMask) { @@ -2001,7 +2001,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, tempGrab.eventMask = deliveryMask; tempGrab.keyboardMode = GrabModeAsync; tempGrab.pointerMode = GrabModeAsync; - tempGrab.confineTo = NullWindow; + tempGrab.confineTo = NullProtocolWindow; tempGrab.cursor = NullCursor; tempGrab.next = NULL; (*dev->deviceGrab.ActivateGrab) (dev, &tempGrab, currentTime, TRUE); @@ -2009,7 +2009,7 @@ CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, } static Mask -DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) +DeviceEventMaskForClient(DeviceIntPtr dev, ProtocolWindowPtr pWin, ClientPtr client) { InputClientsPtr other; @@ -2026,7 +2026,7 @@ DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) void MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabPtr grab = dev->deviceGrab.grab; pWin = dev->valuator->motionHintWindow; @@ -2039,11 +2039,11 @@ MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client) (!grab && (DeviceEventMaskForClient(dev, pWin, client) & DevicePointerMotionHintMask))) - dev->valuator->motionHintWindow = NullWindow; + dev->valuator->motionHintWindow = NullProtocolWindow; } int -DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, +DeviceEventSuppressForWindow(ProtocolWindowPtr pWin, ClientPtr client, Mask mask, int maskndx) { struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); @@ -2069,7 +2069,7 @@ DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, } Bool -ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) +ShouldFreeInputMasks(ProtocolWindowPtr pWin, Bool ignoreSelectedEvents) { int i; Mask allInputEventMasks = 0; @@ -2094,10 +2094,10 @@ ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) */ static void -FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, +FindInterestedChildren(DeviceIntPtr dev, ProtocolWindowPtr p1, Mask mask, xEvent * ev, int count) { - WindowPtr p2; + ProtocolWindowPtr p2; while (p1) { p2 = p1->firstChild; @@ -2117,7 +2117,7 @@ void SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) { int i; - WindowPtr pWin, p1; + ProtocolWindowPtr pWin, p1; for (i = 0; i < screenInfo.numScreens; i++) { pWin = screenInfo.screens[i]->root; @@ -2138,7 +2138,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) * @param mask Event mask in the form of (1 << eventtype) */ int -XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, +XISetEventMask(DeviceIntPtr dev, ProtocolWindowPtr win, ClientPtr client, unsigned int len, unsigned char* mask) { OtherInputMasks *masks; diff --git a/Xi/getprop.c b/Xi/getprop.c index ba98fc80f..2616f34d2 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -96,7 +96,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) CARD16 count = 0; int i, rc; XEventClass *buf = NULL, *tbuf; - WindowPtr pWin; + ProtocolWindowPtr pWin; xGetDeviceDontPropagateListReply rep; OtherInputMasks *others; diff --git a/Xi/getselev.c b/Xi/getselev.c index d63b661cd..5f2c83d1d 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -94,7 +94,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) { int i, rc, total_length = 0; xGetSelectedExtensionEventsReply rep; - WindowPtr pWin; + ProtocolWindowPtr pWin; XEventClass *buf = NULL; XEventClass *tclient; XEventClass *aclient; diff --git a/Xi/selectev.c b/Xi/selectev.c index 031e602ad..210e270b7 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -69,7 +69,7 @@ SOFTWARE. extern Mask ExtExclusiveMasks[]; static int -HandleDevicePresenceMask(ClientPtr client, WindowPtr win, +HandleDevicePresenceMask(ClientPtr client, ProtocolWindowPtr win, XEventClass *cls, CARD16 *count) { int i, j; @@ -148,7 +148,7 @@ ProcXSelectExtensionEvent(ClientPtr client) { int ret; int i; - WindowPtr pWin; + ProtocolWindowPtr pWin; struct tmask tmp[EMASKSIZE]; REQUEST(xSelectExtensionEventReq); diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 4e93f1ae3..b35187283 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -97,7 +97,7 @@ ProcXUngrabDeviceButton(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr mdev; - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabRec temporaryGrab; int rc; diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index 3b4d6260e..82f0c7d2d 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -99,7 +99,7 @@ ProcXUngrabDeviceKey(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr mdev; - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabRec temporaryGrab; int rc; diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c index 215339331..4dfdded86 100644 --- a/Xi/xichangecursor.c +++ b/Xi/xichangecursor.c @@ -70,7 +70,7 @@ SProcXIChangeCursor(ClientPtr client) int ProcXIChangeCursor(ClientPtr client) { int rc; - WindowPtr pWin = NULL; + ProtocolWindowPtr pWin = NULL; DeviceIntPtr pDev = NULL; CursorPtr pCursor = NULL; diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c index 3319ef913..dd76e1845 100644 --- a/Xi/xipassivegrab.c +++ b/Xi/xipassivegrab.c @@ -151,7 +151,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) } } - status = dixLookupWindow((WindowPtr*)&tmp, stuff->grab_window, client, DixSetAttrAccess); + status = dixLookupWindow((ProtocolWindowPtr*)&tmp, stuff->grab_window, client, DixSetAttrAccess); if (status != Success) return status; @@ -245,7 +245,7 @@ int ProcXIPassiveUngrabDevice(ClientPtr client) { DeviceIntPtr dev, mod_dev; - WindowPtr win; + ProtocolWindowPtr win; GrabRec tempGrab; uint32_t* modifiers; int i, rc; diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c index 51317994b..22e902898 100644 --- a/Xi/xiquerypointer.c +++ b/Xi/xiquerypointer.c @@ -76,7 +76,7 @@ ProcXIQueryPointer(ClientPtr client) int rc; xXIQueryPointerReply rep; DeviceIntPtr pDev, kbd; - WindowPtr pWin, t; + ProtocolWindowPtr pWin, t; SpritePtr pSprite; XkbStatePtr state; char *buttons = NULL; diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 22fbaf5e7..3987a2ac9 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -88,7 +88,7 @@ int ProcXISelectEvents(ClientPtr client) { int rc, num_masks; - WindowPtr win; + ProtocolWindowPtr win; DeviceIntPtr dev; DeviceIntRec dummy; xXIEventMask *evmask; @@ -206,7 +206,7 @@ int ProcXIGetSelectedEvents(ClientPtr client) { int rc, i; - WindowPtr win; + ProtocolWindowPtr win; char n; char *buffer = NULL; xXIGetSelectedEventsReply reply; diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c index a463ab94d..9db3b5709 100644 --- a/Xi/xiwarppointer.c +++ b/Xi/xiwarppointer.c @@ -77,7 +77,7 @@ ProcXIWarpPointer(ClientPtr client) { int rc; int x, y; - WindowPtr dest = NULL; + ProtocolWindowPtr dest = NULL; DeviceIntPtr pDev; SpritePtr pSprite; ScreenPtr newScreen; @@ -126,7 +126,7 @@ ProcXIWarpPointer(ClientPtr client) if (stuff->src_win != None) { int winX, winY; - WindowPtr src; + ProtocolWindowPtr src; rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess); if (rc != Success) @@ -177,7 +177,7 @@ static int ProcDbeAllocateBackBufferName(ClientPtr client) { REQUEST(xDbeAllocateBackBufferNameReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; DbeScreenPrivPtr pDbeScreenPriv; DbeWindowPrivPtr pDbeWindowPriv; XdbeScreenVisualInfo scrVisInfo; @@ -482,7 +482,7 @@ static int ProcDbeSwapBuffers(ClientPtr client) { REQUEST(xDbeSwapBuffersReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; DbeScreenPrivPtr pDbeScreenPriv; DbeSwapInfoPtr swapInfo; xDbeSwapInfo *dbeSwapInfo; @@ -1226,7 +1226,7 @@ SProcDbeDispatch(ClientPtr client) *****************************************************************************/ static Bool -DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) +DbeSetupBackgroundPainter(ProtocolWindowPtr pWin, GCPtr pGC) { ChangeGCVal gcvalues[4]; int ts_x_origin, ts_y_origin; diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h index 9c383cef8..4f6e920a4 100644 --- a/dbe/dbestruct.h +++ b/dbe/dbestruct.h @@ -97,7 +97,7 @@ extern _X_EXPORT void DbeExtensionInit (void); */ typedef struct _DbeSwapInfoRec { - WindowPtr pWindow; + ProtocolWindowPtr pWindow; unsigned char swapAction; } DbeSwapInfoRec, *DbeSwapInfoPtr; @@ -113,7 +113,7 @@ typedef struct _DbeWindowPrivRec /* A pointer to the window with which the DBE window private (buffer) is * associated. */ - WindowPtr pWindow; + ProtocolWindowPtr pWindow; /* Last known swap action for this buffer. Legal values for this field * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied. @@ -176,7 +176,7 @@ typedef struct _DbeScreenPrivRec /* Per-screen DIX routines */ Bool (*SetupBackgroundPainter)( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, GCPtr /*pGC*/ ); @@ -186,7 +186,7 @@ typedef struct _DbeScreenPrivRec XdbeScreenVisualInfo * /*pVisInfo*/ ); int (*AllocBackBufferName)( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, XID /*bufId*/, int /*swapAction*/ ); diff --git a/dbe/midbe.c b/dbe/midbe.c index b43ac1b3d..a8c1651e7 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -141,7 +141,7 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo *pScrVisInfo) *****************************************************************************/ static int -miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) +miDbeAllocBackBufferName(ProtocolWindowPtr pWin, XID bufId, int swapAction) { ScreenPtr pScreen; DbeWindowPrivPtr pDbeWindowPriv; @@ -281,7 +281,7 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) { DbeScreenPrivPtr pDbeScreenPriv; GCPtr pGC; - WindowPtr pWin; + ProtocolWindowPtr pWin; MiDbeWindowPrivPrivPtr pDbeWindowPrivPriv; PixmapPtr pTmpBuffer; xRectangle clearRect; @@ -389,13 +389,13 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) swapInfo[0].swapAction = swapInfo[*pNumWindows - 1].swapAction; /* Clear the last window information just to be safe. */ - swapInfo[*pNumWindows - 1].pWindow = (WindowPtr)NULL; + swapInfo[*pNumWindows - 1].pWindow = (ProtocolWindowPtr)NULL; swapInfo[*pNumWindows - 1].swapAction = 0; } else { /* Clear the window information just to be safe. */ - swapInfo[0].pWindow = (WindowPtr)NULL; + swapInfo[0].pWindow = (ProtocolWindowPtr)NULL; swapInfo[0].swapAction = 0; } @@ -545,7 +545,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) ************************************************************************** */ - ret = (*pScreen->PositionWindow)(pWin, x, y); + ret = (*pScreen->PositionWindow)((WindowPtr)pWin, x, y); /* ************************************************************************** @@ -627,7 +627,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) if (clear) { - if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC)) + if ((*pDbeScreenPriv->SetupBackgroundPainter)((ProtocolWindowPtr)pWin, pGC)) { clearRect.x = 0; clearRect.y = 0; diff --git a/dix/colormap.c b/dix/colormap.c index 2e9a80647..b369dfb05 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -173,7 +173,7 @@ static int FreeCo( ); static int TellNoMap( - WindowPtr /*pwin*/, + ProtocolWindowPtr /*pwin*/, Colormap * /*pmid*/ ); @@ -487,7 +487,7 @@ FreeColormap (pointer value, XID mid) /* Tell window that pmid has disappeared */ static int -TellNoMap (WindowPtr pwin, Colormap *pmid) +TellNoMap (ProtocolWindowPtr pwin, Colormap *pmid) { xEvent xE; @@ -502,7 +502,7 @@ TellNoMap (WindowPtr pwin, Colormap *pmid) #ifdef PANORAMIX if(noPanoramiXExtension || !pwin->drawable.pScreen->myNum) #endif - DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); + DeliverEvents(pwin, &xE, 1, NullProtocolWindow); if (pwin->optional) { pwin->optional->colormap = None; CheckWindowOptionalNeed (pwin); @@ -514,7 +514,7 @@ TellNoMap (WindowPtr pwin, Colormap *pmid) /* Tell window that pmid got uninstalled */ int -TellLostMap (WindowPtr pwin, pointer value) +TellLostMap (ProtocolWindowPtr pwin, pointer value) { Colormap *pmid = (Colormap *)value; xEvent xE; @@ -531,7 +531,7 @@ TellLostMap (WindowPtr pwin, pointer value) xE.u.colormap.colormap = *pmid; xE.u.colormap.new = FALSE; xE.u.colormap.state = ColormapUninstalled; - DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); + DeliverEvents(pwin, &xE, 1, (ProtocolWindowPtr)NULL); } return WT_WALKCHILDREN; @@ -539,7 +539,7 @@ TellLostMap (WindowPtr pwin, pointer value) /* Tell window that pmid got installed */ int -TellGainedMap (WindowPtr pwin, pointer value) +TellGainedMap (ProtocolWindowPtr pwin, pointer value) { Colormap *pmid = (Colormap *)value; xEvent xE; @@ -556,7 +556,7 @@ TellGainedMap (WindowPtr pwin, pointer value) xE.u.colormap.colormap = *pmid; xE.u.colormap.new = FALSE; xE.u.colormap.state = ColormapInstalled; - DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); + DeliverEvents(pwin, &xE, 1, (ProtocolWindowPtr)NULL); } return WT_WALKCHILDREN; @@ -2678,7 +2678,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs, ClientPtr client) } int -IsMapInstalled(Colormap map, WindowPtr pWin) +IsMapInstalled(Colormap map, ProtocolWindowPtr pWin) { Colormap *pmaps; int imap, nummaps, found; diff --git a/dix/devices.c b/dix/devices.c index 636b1b661..15cb2f8b3 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1253,7 +1253,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, valc->last_motion = 0; valc->numMotionEvents = numMotionEvents; - valc->motionHintWindow = NullWindow; + valc->motionHintWindow = NullProtocolWindow; valc->numAxes = numAxes; valc->axisVal = (double *)(align + 1); valc->axes = (AxisInfoPtr)(valc->axisVal + numAxes); @@ -1377,7 +1377,7 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev) focc->win = PointerRootWin; focc->revert = None; focc->time = currentTime; - focc->trace = (WindowPtr *)NULL; + focc->trace = (ProtocolWindowPtr *)NULL; focc->traceSize = 0; focc->traceGood = 0; focc->sourceid = dev->id; @@ -2192,13 +2192,13 @@ MaybeStopHint(DeviceIntPtr dev, ClientPtr client) (!grab && (EventMaskForClient(dev->valuator->motionHintWindow, client) & PointerMotionHintMask))) - dev->valuator->motionHintWindow = NullWindow; + dev->valuator->motionHintWindow = NullProtocolWindow; } int ProcGetMotionEvents(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; xTimecoord * coords = (xTimecoord *) NULL; xGetMotionEventsReply rep; int i, count, xmin, xmax, ymin, ymax, rc; @@ -2444,7 +2444,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) */ if (!master) { - WindowPtr currentRoot; + ProtocolWindowPtr currentRoot; if (dev->spriteInfo->sprite) currentRoot = GetCurrentRootWindow(dev); diff --git a/dix/dispatch.c b/dix/dispatch.c index 601b14a71..52dce4eed 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -637,7 +637,7 @@ ProcBadRequest(ClientPtr client) int ProcCreateWindow(ClientPtr client) { - WindowPtr pParent, pWin; + ProtocolWindowPtr pParent, pWin; REQUEST(xCreateWindowReq); int len, rc; @@ -676,7 +676,7 @@ ProcCreateWindow(ClientPtr client) int ProcChangeWindowAttributes(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xChangeWindowAttributesReq); int len, rc; Mask access_mode = 0; @@ -699,7 +699,7 @@ ProcChangeWindowAttributes(ClientPtr client) int ProcGetWindowAttributes(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); xGetWindowAttributesReply wa; int rc; @@ -717,7 +717,7 @@ ProcGetWindowAttributes(ClientPtr client) int ProcDestroyWindow(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); int rc; @@ -738,7 +738,7 @@ ProcDestroyWindow(ClientPtr client) int ProcDestroySubwindows(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); int rc; @@ -753,7 +753,7 @@ ProcDestroySubwindows(ClientPtr client) int ProcChangeSaveSet(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xChangeSaveSetReq); int rc; @@ -772,7 +772,7 @@ ProcChangeSaveSet(ClientPtr client) int ProcReparentWindow(ClientPtr client) { - WindowPtr pWin, pParent; + ProtocolWindowPtr pWin, pParent; REQUEST(xReparentWindowReq); int rc; @@ -798,7 +798,7 @@ ProcReparentWindow(ClientPtr client) int ProcMapWindow(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); int rc; @@ -814,7 +814,7 @@ ProcMapWindow(ClientPtr client) int ProcMapSubwindows(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); int rc; @@ -830,7 +830,7 @@ ProcMapSubwindows(ClientPtr client) int ProcUnmapWindow(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); int rc; @@ -846,7 +846,7 @@ ProcUnmapWindow(ClientPtr client) int ProcUnmapSubwindows(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); int rc; @@ -861,7 +861,7 @@ ProcUnmapSubwindows(ClientPtr client) int ProcConfigureWindow(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xConfigureWindowReq); int len, rc; @@ -879,7 +879,7 @@ ProcConfigureWindow(ClientPtr client) int ProcCirculateWindow(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xCirculateWindowReq); int rc; @@ -919,7 +919,7 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep) if (WindowDrawable(pDraw->type)) { - WindowPtr pWin = (WindowPtr)pDraw; + ProtocolWindowPtr pWin = (ProtocolWindowPtr)pDraw; rep->x = pWin->origin.x - wBorderWidth (pWin); rep->y = pWin->origin.y - wBorderWidth (pWin); rep->borderWidth = pWin->borderWidth; @@ -953,7 +953,7 @@ ProcQueryTree(ClientPtr client) { xQueryTreeReply reply; int rc, numChildren = 0; - WindowPtr pChild, pWin, pHead; + ProtocolWindowPtr pChild, pWin, pHead; Window *childIDs = (Window *)NULL; REQUEST(xResourceReq); @@ -1125,7 +1125,7 @@ ProcTranslateCoords(ClientPtr client) { REQUEST(xTranslateCoordsReq); - WindowPtr pWin, pDst; + ProtocolWindowPtr pWin, pDst; xTranslateCoordsReply rep; int rc; @@ -1179,7 +1179,7 @@ ProcTranslateCoords(ClientPtr client) ) { rep.child = pWin->drawable.id; - pWin = (WindowPtr) NULL; + pWin = (ProtocolWindowPtr) NULL; } else pWin = pWin->nextSib; @@ -1591,7 +1591,7 @@ int ProcClearToBackground(ClientPtr client) { REQUEST(xClearAreaReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; int rc; REQUEST_SIZE_MATCH(xClearAreaReq); @@ -1608,7 +1608,7 @@ ProcClearToBackground(ClientPtr client) client->errorValue = stuff->exposures; return BadValue; } - (*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y, + (*pWin->drawable.pScreen->ClearToBackground)((WindowPtr)pWin, stuff->x, stuff->y, stuff->width, stuff->height, (Bool)stuff->exposures); return Success; @@ -2023,7 +2023,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, if(pDraw->type == DRAWABLE_WINDOW) { - WindowPtr pWin = (WindowPtr)pDraw; + ProtocolWindowPtr pWin = (ProtocolWindowPtr)pDraw; /* "If the drawable is a window, the window must be viewable ... or a * BadMatch error results" */ @@ -2034,7 +2034,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, rely += pDraw->y; if (pDraw->pScreen->GetWindowPixmap) { - PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin); + PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) ((WindowPtr)pWin); pBoundingDraw = &pPix->drawable; #ifdef COMPOSITE @@ -2137,7 +2137,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, if (pDraw->type == DRAWABLE_WINDOW) { - pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); + pVisibleRegion = NotClippedByChildren((ProtocolWindowPtr)pDraw); if (pVisibleRegion) { RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y); @@ -2343,7 +2343,7 @@ ProcCreateColormap(ClientPtr client) VisualPtr pVisual; ColormapPtr pmap; Colormap mid; - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; REQUEST(xCreateColormapReq); int i, result; @@ -2481,7 +2481,7 @@ ProcListInstalledColormaps(ClientPtr client) { xListInstalledColormapsReply *preply; int nummaps, rc; - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); @@ -3642,7 +3642,7 @@ SendConnSetup(ClientPtr client, char *reason) { unsigned int j; xDepth *pDepth; - WindowPtr pRoot = screenInfo.screens[i]->root; + ProtocolWindowPtr pRoot = screenInfo.screens[i]->root; root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot); pDepth = (xDepth *)(root + 1); diff --git a/dix/dixutils.c b/dix/dixutils.c index 104363b72..b4bd89b8b 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -221,7 +221,7 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, } int -dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) +dixLookupWindow(ProtocolWindowPtr *pWin, XID id, ClientPtr client, Mask access) { int rc; rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access); @@ -278,7 +278,7 @@ bad: } int -AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, +AlterSaveSetForClient(ClientPtr client, ProtocolWindowPtr pWin, unsigned mode, Bool toRoot, Bool map) { int numnow; @@ -334,7 +334,7 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, } void -DeleteWindowFromAnySaveSet(WindowPtr pWin) +DeleteWindowFromAnySaveSet(ProtocolWindowPtr pWin) { int i; ClientPtr client; diff --git a/dix/enterleave.c b/dix/enterleave.c index b1ee3fb32..e5e1b3d35 100644 --- a/dix/enterleave.c +++ b/dix/enterleave.c @@ -70,15 +70,15 @@ * NotifyPointer events are only sent for pointer 2. */ -static WindowPtr PointerWindows[MAXDEVICES]; -static WindowPtr FocusWindows[MAXDEVICES]; +static ProtocolWindowPtr PointerWindows[MAXDEVICES]; +static ProtocolWindowPtr FocusWindows[MAXDEVICES]; /** * Return TRUE if 'win' has a pointer within its boundaries, excluding child * window. */ static BOOL -HasPointer(DeviceIntPtr dev, WindowPtr win) +HasPointer(DeviceIntPtr dev, ProtocolWindowPtr win) { int i; @@ -103,7 +103,7 @@ HasPointer(DeviceIntPtr dev, WindowPtr win) * descendants of win). */ static BOOL -HasFocus(WindowPtr win) +HasFocus(ProtocolWindowPtr win) { int i; for (i = 0; i < MAXDEVICES; i++) @@ -116,7 +116,7 @@ HasFocus(WindowPtr win) /** * Return the window the device dev is currently on. */ -static WindowPtr +static ProtocolWindowPtr PointerWin(DeviceIntPtr dev) { return PointerWindows[dev->id]; @@ -129,8 +129,8 @@ PointerWin(DeviceIntPtr dev) * @return The child window that has the pointer within its boundaries or * NULL. */ -static WindowPtr -FirstPointerChild(WindowPtr win) +static ProtocolWindowPtr +FirstPointerChild(ProtocolWindowPtr win) { int i; for (i = 0; i < MAXDEVICES; i++) @@ -149,8 +149,8 @@ FirstPointerChild(WindowPtr win) * @return The child window that has the pointer within its boundaries or * NULL. */ -static WindowPtr -FirstFocusChild(WindowPtr win) +static ProtocolWindowPtr +FirstFocusChild(ProtocolWindowPtr win) { int i; for (i = 0; i < MAXDEVICES; i++) @@ -167,7 +167,7 @@ FirstFocusChild(WindowPtr win) * Set the presence flag for dev to mark that it is now in 'win'. */ void -EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode) +EnterWindow(DeviceIntPtr dev, ProtocolWindowPtr win, int mode) { PointerWindows[dev->id] = win; } @@ -185,7 +185,7 @@ LeaveWindow(DeviceIntPtr dev) * Set the presence flag for dev to mark that it is now in 'win'. */ void -SetFocusIn(DeviceIntPtr dev, WindowPtr win) +SetFocusIn(DeviceIntPtr dev, ProtocolWindowPtr win) { FocusWindows[dev->id] = win; } @@ -207,16 +207,16 @@ SetFocusOut(DeviceIntPtr dev) * @param a A window with the same ancestor as b. * @param b A window with the same ancestor as a. * @return The window that is the first ancestor of both 'a' and 'b', or the - * NullWindow if they do not have a common ancestor. + * NullProtocolWindow if they do not have a common ancestor. */ -WindowPtr +ProtocolWindowPtr CommonAncestor( - WindowPtr a, - WindowPtr b) + ProtocolWindowPtr a, + ProtocolWindowPtr b) { for (b = b->parent; b; b = b->parent) if (IsParent(b, a)) return b; - return NullWindow; + return NullProtocolWindow; } @@ -228,12 +228,12 @@ CommonAncestor( static void DeviceEnterNotifies(DeviceIntPtr dev, int sourceid, - WindowPtr ancestor, - WindowPtr child, + ProtocolWindowPtr ancestor, + ProtocolWindowPtr child, int mode, int detail) { - WindowPtr parent = child->parent; + ProtocolWindowPtr parent = child->parent; if (ancestor == parent) return; @@ -249,12 +249,12 @@ DeviceEnterNotifies(DeviceIntPtr dev, */ static void CoreEnterNotifies(DeviceIntPtr dev, - WindowPtr ancestor, - WindowPtr child, + ProtocolWindowPtr ancestor, + ProtocolWindowPtr child, int mode, int detail) { - WindowPtr parent = child->parent; + ProtocolWindowPtr parent = child->parent; if (ancestor == parent) return; CoreEnterNotifies(dev, ancestor, parent, mode, detail); @@ -286,12 +286,12 @@ CoreEnterNotifies(DeviceIntPtr dev, static void CoreLeaveNotifies(DeviceIntPtr dev, - WindowPtr child, - WindowPtr ancestor, + ProtocolWindowPtr child, + ProtocolWindowPtr ancestor, int mode, int detail) { - WindowPtr win; + ProtocolWindowPtr win; if (ancestor == child) return; @@ -334,12 +334,12 @@ CoreLeaveNotifies(DeviceIntPtr dev, static void DeviceLeaveNotifies(DeviceIntPtr dev, int sourceid, - WindowPtr child, - WindowPtr ancestor, + ProtocolWindowPtr child, + ProtocolWindowPtr ancestor, int mode, int detail) { - WindowPtr win; + ProtocolWindowPtr win; if (ancestor == child) return; @@ -357,11 +357,11 @@ DeviceLeaveNotifies(DeviceIntPtr dev, */ static void CoreEnterLeaveNonLinear(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, + ProtocolWindowPtr A, + ProtocolWindowPtr B, int mode) { - WindowPtr X = CommonAncestor(A, B); + ProtocolWindowPtr X = CommonAncestor(A, B); /* Case 4: A is W, B is above W @@ -384,7 +384,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev, if (!HasPointer(dev, A)) { - WindowPtr child = FirstPointerChild(A); + ProtocolWindowPtr child = FirstPointerChild(A); if (child) CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); else @@ -428,7 +428,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev, if (!HasPointer(dev, B)) { - WindowPtr child = FirstPointerChild(B); + ProtocolWindowPtr child = FirstPointerChild(B); if (child) CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); else @@ -441,8 +441,8 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev, */ static void CoreEnterLeaveToAncestor(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, + ProtocolWindowPtr A, + ProtocolWindowPtr B, int mode) { /* Case 4: @@ -466,7 +466,7 @@ CoreEnterLeaveToAncestor(DeviceIntPtr dev, */ if (!HasPointer(dev, A)) { - WindowPtr child = FirstPointerChild(A); + ProtocolWindowPtr child = FirstPointerChild(A); if (child) CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); else @@ -499,8 +499,8 @@ CoreEnterLeaveToAncestor(DeviceIntPtr dev, */ static void CoreEnterLeaveToDescendant(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, + ProtocolWindowPtr A, + ProtocolWindowPtr B, int mode) { /* Case 6: @@ -542,7 +542,7 @@ CoreEnterLeaveToDescendant(DeviceIntPtr dev, if (!HasPointer(dev, B)) { - WindowPtr child = FirstPointerChild(B); + ProtocolWindowPtr child = FirstPointerChild(B); if (child) CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); else @@ -552,8 +552,8 @@ CoreEnterLeaveToDescendant(DeviceIntPtr dev, static void CoreEnterLeaveEvents(DeviceIntPtr dev, - WindowPtr from, - WindowPtr to, + ProtocolWindowPtr from, + ProtocolWindowPtr to, int mode) { if (!IsMaster(dev)) @@ -574,8 +574,8 @@ CoreEnterLeaveEvents(DeviceIntPtr dev, static void DeviceEnterLeaveEvents(DeviceIntPtr dev, int sourceid, - WindowPtr from, - WindowPtr to, + ProtocolWindowPtr from, + ProtocolWindowPtr to, int mode) { if (IsParent(from, to)) @@ -592,8 +592,8 @@ DeviceEnterLeaveEvents(DeviceIntPtr dev, } else { /* neither from nor to is descendent of the other */ - WindowPtr common = CommonAncestor(to, from); - /* common == NullWindow ==> different screens */ + ProtocolWindowPtr common = CommonAncestor(to, from); + /* common == NullProtocolWindow ==> different screens */ DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyNonlinear, from, None); DeviceLeaveNotifies(dev, sourceid, from, common, mode, NotifyNonlinearVirtual); DeviceEnterNotifies(dev, sourceid, common, to, mode, NotifyNonlinearVirtual); @@ -611,8 +611,8 @@ DeviceEnterLeaveEvents(DeviceIntPtr dev, void DoEnterLeaveEvents(DeviceIntPtr pDev, int sourceid, - WindowPtr fromWin, - WindowPtr toWin, + ProtocolWindowPtr fromWin, + ProtocolWindowPtr toWin, int mode) { if (!IsPointerDevice(pDev)) @@ -632,12 +632,12 @@ DoEnterLeaveEvents(DeviceIntPtr pDev, */ static void DeviceFocusOutEvents(DeviceIntPtr dev, - WindowPtr child, - WindowPtr ancestor, + ProtocolWindowPtr child, + ProtocolWindowPtr ancestor, int mode, int detail) { - WindowPtr win; + ProtocolWindowPtr win; if (ancestor == child) return; @@ -653,12 +653,12 @@ DeviceFocusOutEvents(DeviceIntPtr dev, */ static void DeviceFocusInEvents(DeviceIntPtr dev, - WindowPtr ancestor, - WindowPtr child, + ProtocolWindowPtr ancestor, + ProtocolWindowPtr child, int mode, int detail) { - WindowPtr parent = child->parent; + ProtocolWindowPtr parent = child->parent; if (ancestor == parent || !parent) return; @@ -673,12 +673,12 @@ DeviceFocusInEvents(DeviceIntPtr dev, */ static void CoreFocusInEvents(DeviceIntPtr dev, - WindowPtr ancestor, - WindowPtr child, + ProtocolWindowPtr ancestor, + ProtocolWindowPtr child, int mode, int detail) { - WindowPtr parent = child->parent; + ProtocolWindowPtr parent = child->parent; if (ancestor == parent) return; CoreFocusInEvents(dev, ancestor, parent, mode, detail); @@ -708,12 +708,12 @@ CoreFocusInEvents(DeviceIntPtr dev, static void CoreFocusOutEvents(DeviceIntPtr dev, - WindowPtr child, - WindowPtr ancestor, + ProtocolWindowPtr child, + ProtocolWindowPtr ancestor, int mode, int detail) { - WindowPtr win; + ProtocolWindowPtr win; if (ancestor == child) return; @@ -759,12 +759,12 @@ CoreFocusOutEvents(DeviceIntPtr dev, */ static void CoreFocusOutNotifyPointerEvents(DeviceIntPtr dev, - WindowPtr pwin_parent, - WindowPtr exclude, + ProtocolWindowPtr pwin_parent, + ProtocolWindowPtr exclude, int mode, int inclusive) { - WindowPtr P, stopAt; + ProtocolWindowPtr P, stopAt; P = PointerWin(GetPairedDevice(dev)); @@ -790,8 +790,8 @@ CoreFocusOutNotifyPointerEvents(DeviceIntPtr dev, */ static void CoreFocusInRecurse(DeviceIntPtr dev, - WindowPtr win, - WindowPtr stopAt, + ProtocolWindowPtr win, + ProtocolWindowPtr stopAt, int mode, int inclusive) { @@ -814,12 +814,12 @@ CoreFocusInRecurse(DeviceIntPtr dev, */ static void CoreFocusInNotifyPointerEvents(DeviceIntPtr dev, - WindowPtr pwin_parent, - WindowPtr exclude, + ProtocolWindowPtr pwin_parent, + ProtocolWindowPtr exclude, int mode, int inclusive) { - WindowPtr P; + ProtocolWindowPtr P; P = PointerWin(GetPairedDevice(dev)); @@ -839,11 +839,11 @@ CoreFocusInNotifyPointerEvents(DeviceIntPtr dev, */ static void CoreFocusNonLinear(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, + ProtocolWindowPtr A, + ProtocolWindowPtr B, int mode) { - WindowPtr X = CommonAncestor(A, B); + ProtocolWindowPtr X = CommonAncestor(A, B); /* Case 4: A is W, B is above W @@ -866,7 +866,7 @@ CoreFocusNonLinear(DeviceIntPtr dev, if (!HasFocus(A)) { - WindowPtr child = FirstFocusChild(A); + ProtocolWindowPtr child = FirstFocusChild(A); if (child) { /* NotifyPointer P-A unless P is child or below*/ @@ -916,7 +916,7 @@ CoreFocusNonLinear(DeviceIntPtr dev, if (!HasFocus(B)) { - WindowPtr child = FirstFocusChild(B); + ProtocolWindowPtr child = FirstFocusChild(B); if (child) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); @@ -936,8 +936,8 @@ CoreFocusNonLinear(DeviceIntPtr dev, */ static void CoreFocusToAncestor(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, + ProtocolWindowPtr A, + ProtocolWindowPtr B, int mode) { /* Case 4: @@ -960,7 +960,7 @@ CoreFocusToAncestor(DeviceIntPtr dev, */ if (!HasFocus(A)) { - WindowPtr child = FirstFocusChild(A); + ProtocolWindowPtr child = FirstFocusChild(A); if (child) { /* NotifyPointer P-A unless P is child or below*/ @@ -997,8 +997,8 @@ CoreFocusToAncestor(DeviceIntPtr dev, */ static void CoreFocusToDescendant(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, + ProtocolWindowPtr A, + ProtocolWindowPtr B, int mode) { /* Case 6: @@ -1042,7 +1042,7 @@ CoreFocusToDescendant(DeviceIntPtr dev, if (!HasFocus(B)) { - WindowPtr child = FirstFocusChild(B); + ProtocolWindowPtr child = FirstFocusChild(B); if (child) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); @@ -1054,7 +1054,7 @@ CoreFocusToDescendant(DeviceIntPtr dev, } static BOOL -HasOtherPointer(WindowPtr win, DeviceIntPtr exclude) +HasOtherPointer(ProtocolWindowPtr win, DeviceIntPtr exclude) { int i; @@ -1071,11 +1071,11 @@ HasOtherPointer(WindowPtr win, DeviceIntPtr exclude) */ static void CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, - WindowPtr A, /* PointerRootWin or NoneWin */ - WindowPtr B, /* NoneWin or PointerRootWin */ + ProtocolWindowPtr A, /* PointerRootWin or NoneWin */ + ProtocolWindowPtr B, /* NoneWin or PointerRootWin */ int mode) { - WindowPtr root; + ProtocolWindowPtr root; int i; int nscreens = screenInfo.numScreens; @@ -1095,7 +1095,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, if (dev->focus && dev->focus->win == PointerRootWin && B != PointerRootWin) { - WindowPtr ptrwin = PointerWin(GetPairedDevice(dev)); + ProtocolWindowPtr ptrwin = PointerWin(GetPairedDevice(dev)); if (ptrwin && IsParent(root, ptrwin)) CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE); } @@ -1114,11 +1114,11 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, */ static void CoreFocusToPointerRootOrNone(DeviceIntPtr dev, - WindowPtr A, - WindowPtr B, /* PointerRootWin or NoneWin */ + ProtocolWindowPtr A, + ProtocolWindowPtr B, /* PointerRootWin or NoneWin */ int mode) { - WindowPtr root; + ProtocolWindowPtr root; int i; int nscreens = screenInfo.numScreens; @@ -1129,7 +1129,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, if (!HasFocus(A)) { - WindowPtr child = FirstFocusChild(A); + ProtocolWindowPtr child = FirstFocusChild(A); if (child) { /* NotifyPointer P-A unless P is B or below*/ @@ -1142,8 +1142,8 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, } } - /* NullWindow means we include the root window */ - CoreFocusOutEvents(dev, A, NullWindow, mode, NotifyNonlinearVirtual); + /* NullProtocolWindow means we include the root window */ + CoreFocusOutEvents(dev, A, NullProtocolWindow, mode, NotifyNonlinearVirtual); for (i = 0; i < nscreens; i++) { @@ -1163,11 +1163,11 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, */ static void CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, - WindowPtr A, /* PointerRootWin or NoneWin */ - WindowPtr B, + ProtocolWindowPtr A, /* PointerRootWin or NoneWin */ + ProtocolWindowPtr B, int mode) { - WindowPtr root; + ProtocolWindowPtr root; int i; int nscreens = screenInfo.numScreens; @@ -1187,7 +1187,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, if (dev->focus && dev->focus->win == PointerRootWin && B != PointerRootWin) { - WindowPtr ptrwin = PointerWin(GetPairedDevice(dev)); + ProtocolWindowPtr ptrwin = PointerWin(GetPairedDevice(dev)); if (ptrwin) CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE); } @@ -1208,7 +1208,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, if (!HasFocus(B)) { - WindowPtr child = FirstFocusChild(B); + ProtocolWindowPtr child = FirstFocusChild(B); if (child) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); @@ -1225,8 +1225,8 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, static void CoreFocusEvents(DeviceIntPtr dev, - WindowPtr from, - WindowPtr to, + ProtocolWindowPtr from, + ProtocolWindowPtr to, int mode) { if (!IsMaster(dev)) @@ -1234,12 +1234,12 @@ CoreFocusEvents(DeviceIntPtr dev, SetFocusOut(dev); - if (((to == NullWindow) || (to == PointerRootWin)) && - ((from == NullWindow) || (from == PointerRootWin))) + if (((to == NullProtocolWindow) || (to == PointerRootWin)) && + ((from == NullProtocolWindow) || (from == PointerRootWin))) CoreFocusPointerRootNoneSwitch(dev, from, to, mode); - else if ((to == NullWindow) || (to == PointerRootWin)) + else if ((to == NullProtocolWindow) || (to == PointerRootWin)) CoreFocusToPointerRootOrNone(dev, from, to, mode); - else if ((from == NullWindow) || (from == PointerRootWin)) + else if ((from == NullProtocolWindow) || (from == PointerRootWin)) CoreFocusFromPointerRootOrNone(dev, from, to, mode); else if (IsParent(from, to)) CoreFocusToDescendant(dev, from, to, mode); @@ -1253,8 +1253,8 @@ CoreFocusEvents(DeviceIntPtr dev, static void DeviceFocusEvents(DeviceIntPtr dev, - WindowPtr from, - WindowPtr to, + ProtocolWindowPtr from, + ProtocolWindowPtr to, int mode) { int out, in; /* for holding details for to/from @@ -1274,9 +1274,9 @@ DeviceFocusEvents(DeviceIntPtr dev, nscreens = 1; #endif - if ((to == NullWindow) || (to == PointerRootWin)) + if ((to == NullProtocolWindow) || (to == PointerRootWin)) { - if ((from == NullWindow) || (from == PointerRootWin)) + if ((from == NullProtocolWindow) || (from == PointerRootWin)) { if (from == PointerRootWin) DeviceFocusOutEvents(dev, sprite->win, GetCurrentRootWindow(dev), mode, @@ -1292,7 +1292,7 @@ DeviceFocusEvents(DeviceIntPtr dev, NotifyPointer); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); /* next call catches the root too, if the screen changed */ - DeviceFocusOutEvents(dev, from->parent, NullWindow, mode, + DeviceFocusOutEvents(dev, from->parent, NullProtocolWindow, mode, NotifyNonlinearVirtual); } /* Notify all the roots */ @@ -1303,14 +1303,14 @@ DeviceFocusEvents(DeviceIntPtr dev, } else { - if ((from == NullWindow) || (from == PointerRootWin)) + if ((from == NullProtocolWindow) || (from == PointerRootWin)) { if (from == PointerRootWin) DeviceFocusOutEvents(dev, sprite->win, GetCurrentRootWindow(dev), mode, NotifyPointer); for (i = 0; i < nscreens; i++) DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root); - if (to->parent != NullWindow) + if (to->parent != NullProtocolWindow) DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), to, mode, NotifyNonlinearVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); if (IsParent(to, sprite->win)) @@ -1346,16 +1346,16 @@ DeviceFocusEvents(DeviceIntPtr dev, else { /* neither from or to is child of other */ - WindowPtr common = CommonAncestor(to, from); - /* common == NullWindow ==> different screens */ + ProtocolWindowPtr common = CommonAncestor(to, from); + /* common == NullProtocolWindow ==> different screens */ if (IsParent(from, sprite->win)) DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); - if (from->parent != NullWindow) + if (from->parent != NullProtocolWindow) DeviceFocusOutEvents(dev, from->parent, common, mode, NotifyNonlinearVirtual); - if (to->parent != NullWindow) + if (to->parent != NullProtocolWindow) DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); if (IsParent(to, sprite->win)) @@ -1374,8 +1374,8 @@ DeviceFocusEvents(DeviceIntPtr dev, */ void DoFocusEvents(DeviceIntPtr pDev, - WindowPtr from, - WindowPtr to, + ProtocolWindowPtr from, + ProtocolWindowPtr to, int mode) { if (!IsKeyboardDevice(pDev)) diff --git a/dix/enterleave.h b/dix/enterleave.h index 471f4efaa..662f59f9b 100644 --- a/dix/enterleave.h +++ b/dix/enterleave.h @@ -34,15 +34,15 @@ extern void DoEnterLeaveEvents( DeviceIntPtr pDev, int sourceid, - WindowPtr fromWin, - WindowPtr toWin, + ProtocolWindowPtr fromWin, + ProtocolWindowPtr toWin, int mode ); extern void DoFocusEvents( DeviceIntPtr pDev, - WindowPtr fromWin, - WindowPtr toWin, + ProtocolWindowPtr fromWin, + ProtocolWindowPtr toWin, int mode ); @@ -51,29 +51,29 @@ extern void EnterLeaveEvent( int type, int mode, int detail, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child); -extern WindowPtr CommonAncestor( - WindowPtr a, - WindowPtr b); +extern ProtocolWindowPtr CommonAncestor( + ProtocolWindowPtr a, + ProtocolWindowPtr b); extern void CoreEnterLeaveEvent(DeviceIntPtr mouse, int type, int mode, int detail, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child); extern void DeviceEnterLeaveEvent(DeviceIntPtr mouse, int sourceid, int type, int mode, int detail, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child); extern void EnterWindow(DeviceIntPtr dev, - WindowPtr win, + ProtocolWindowPtr win, int mode); extern void LeaveWindow(DeviceIntPtr dev); @@ -82,16 +82,16 @@ extern void CoreFocusEvent(DeviceIntPtr kbd, int type, int mode, int detail, - WindowPtr pWin); + ProtocolWindowPtr pWin); extern void DeviceFocusEvent(DeviceIntPtr kbd, int type, int mode, int detail, - WindowPtr pWin); + ProtocolWindowPtr pWin); extern void SetFocusIn(DeviceIntPtr kbd, - WindowPtr win); + ProtocolWindowPtr win); extern void SetFocusOut(DeviceIntPtr dev); #endif /* _ENTERLEAVE_H_ */ diff --git a/dix/events.c b/dix/events.c index 8835c5e61..d8a048391 100644 --- a/dix/events.c +++ b/dix/events.c @@ -203,7 +203,7 @@ CallbackListPtr DeviceEventCallback; Mask DontPropagateMasks[DNPMCOUNT]; static int DontPropagateRefCnts[DNPMCOUNT]; -static void CheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin); +static void CheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, ProtocolWindowPtr pWin); static void CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, @@ -425,7 +425,7 @@ GetEventFilter(DeviceIntPtr dev, xEvent *event) * Return the windows complete XI2 mask for the given XI2 event type. */ Mask -GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev) +GetWindowXI2Mask(DeviceIntPtr dev, ProtocolWindowPtr win, xEvent* ev) { OtherInputMasks *inputMasks = wOtherInputMasks(win); int filter; @@ -552,7 +552,7 @@ XineramaConstrainCursor(DeviceIntPtr pDev) static Bool -XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) +XineramaSetWindowPntrs(DeviceIntPtr pDev, ProtocolWindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -581,7 +581,7 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) static void XineramaConfineCursorToWindow(DeviceIntPtr pDev, - WindowPtr pWin, + ProtocolWindowPtr pWin, Bool generateEvents) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -620,7 +620,7 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, pSprite->hotShape = NullRegion; pSprite->confined = FALSE; - pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin; + pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullProtocolWindow : pWin; CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL); } @@ -772,7 +772,7 @@ static void CheckVirtualMotion( DeviceIntPtr pDev, QdEventPtr qe, - WindowPtr pWin) + ProtocolWindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; RegionPtr reg = NULL; @@ -793,7 +793,7 @@ CheckVirtualMotion( pSprite->hot.pScreen = qe->pScreen; pSprite->hot.x = ev->root_x; pSprite->hot.y = ev->root_y; - pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullWindow; + pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab->confineTo : NullProtocolWindow; break; default: break; @@ -880,7 +880,7 @@ CheckVirtualMotion( } static void -ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen) +ConfineCursorToWindow(DeviceIntPtr pDev, ProtocolWindowPtr pWin, Bool generateEvents, Bool confineToScreen) { SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -949,7 +949,7 @@ ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) * @returns true if b is a descendent of a */ Bool -IsParent(WindowPtr a, WindowPtr b) +IsParent(ProtocolWindowPtr a, ProtocolWindowPtr b) { for (b = b->parent; b; b = b->parent) if (b == a) return TRUE; @@ -964,7 +964,7 @@ IsParent(WindowPtr a, WindowPtr b) static void PostNewCursor(DeviceIntPtr pDev) { - WindowPtr win; + ProtocolWindowPtr win; GrabPtr grab = pDev->deviceGrab.grab; SpritePtr pSprite = pDev->spriteInfo->sprite; CursorPtr pCursor; @@ -1006,7 +1006,7 @@ PostNewCursor(DeviceIntPtr pDev) * @param dev device which you want to know its current root window * @return root window where dev's sprite is located */ -WindowPtr +ProtocolWindowPtr GetCurrentRootWindow(DeviceIntPtr dev) { return RootWindow(dev->spriteInfo->sprite); @@ -1015,7 +1015,7 @@ GetCurrentRootWindow(DeviceIntPtr dev) /** * @return window underneath the cursor sprite. */ -WindowPtr +ProtocolWindowPtr GetSpriteWindow(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->win; @@ -1197,7 +1197,7 @@ PlayReleasedEvents(void) if (*syncEvents.pendtail == *prev) syncEvents.pendtail = prev; if (qe->event->any.type == ET_Motion) - CheckVirtualMotion(pDev, qe, NullWindow); + CheckVirtualMotion(pDev, qe, NullProtocolWindow); syncEvents.time.months = qe->months; syncEvents.time.milliseconds = qe->event->any.time; #ifdef PANORAMIX @@ -1271,7 +1271,7 @@ static void ComputeFreezes(void) { DeviceIntPtr replayDev = syncEvents.replayDev; - WindowPtr w; + ProtocolWindowPtr w; GrabPtr grab; DeviceIntPtr dev; @@ -1295,7 +1295,7 @@ ComputeFreezes(void) DeliverFocusedEvent(replayDev, (InternalEvent*)event, w); else DeliverDeviceEvents(w, (InternalEvent*)event, NullGrab, - NullWindow, replayDev); + NullProtocolWindow, replayDev); } } for (dev = inputInfo.devices; dev; dev = dev->next) @@ -1449,7 +1449,7 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, TimeStamp time, Bool autoGrab) { GrabInfoPtr grabinfo = &mouse->deviceGrab; - WindowPtr oldWin = (grabinfo->grab) ? + ProtocolWindowPtr oldWin = (grabinfo->grab) ? grabinfo->grab->window : mouse->spriteInfo->sprite->win; Bool isPassive = autoGrab & ~ImplicitGrabMask; @@ -1468,7 +1468,7 @@ ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); } DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab); - mouse->valuator->motionHintWindow = NullWindow; + mouse->valuator->motionHintWindow = NullProtocolWindow; if (syncEvents.playingEvents) grabinfo->grabTime = syncEvents.time; else @@ -1496,7 +1496,7 @@ DeactivatePointerGrab(DeviceIntPtr mouse) Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab && mouse->deviceGrab.implicitGrab); - mouse->valuator->motionHintWindow = NullWindow; + mouse->valuator->motionHintWindow = NullProtocolWindow; mouse->deviceGrab.grab = NullGrab; mouse->deviceGrab.sync.state = NOT_GRABBED; mouse->deviceGrab.fromPassiveGrab = FALSE; @@ -1529,7 +1529,7 @@ void ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) { GrabInfoPtr grabinfo = &keybd->deviceGrab; - WindowPtr oldWin; + ProtocolWindowPtr oldWin; /* slave devices need to float for the duration of the grab. */ if (grab->grabtype == GRABTYPE_XI2 && @@ -1546,7 +1546,7 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool pass if (oldWin == FollowKeyboardWin) oldWin = keybd->focus->win; if (keybd->valuator) - keybd->valuator->motionHintWindow = NullWindow; + keybd->valuator->motionHintWindow = NullProtocolWindow; DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); if (syncEvents.playingEvents) grabinfo->grabTime = syncEvents.time; @@ -1567,7 +1567,7 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) { GrabPtr grab = keybd->deviceGrab.grab; DeviceIntPtr dev; - WindowPtr focusWin = keybd->focus ? keybd->focus->win + ProtocolWindowPtr focusWin = keybd->focus ? keybd->focus->win : keybd->spriteInfo->sprite->win; Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab && keybd->deviceGrab.implicitGrab); @@ -1575,7 +1575,7 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd) if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; if (keybd->valuator) - keybd->valuator->motionHintWindow = NullWindow; + keybd->valuator->motionHintWindow = NullProtocolWindow; keybd->deviceGrab.grab = NullGrab; keybd->deviceGrab.sync.state = NOT_GRABBED; keybd->deviceGrab.fromPassiveGrab = FALSE; @@ -1959,7 +1959,7 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, * @return Number of events delivered to various clients. */ int -DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent +DeliverEventsToWindow(DeviceIntPtr pDev, ProtocolWindowPtr pWin, xEvent *pEvents, int count, Mask filter, GrabPtr grab) { int deliveries = 0, nondeliveries = 0; @@ -2066,7 +2066,7 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent tempGrab.eventMask = deliveryMask; tempGrab.keyboardMode = GrabModeAsync; tempGrab.pointerMode = GrabModeAsync; - tempGrab.confineTo = NullWindow; + tempGrab.confineTo = NullProtocolWindow; tempGrab.cursor = NullCursor; tempGrab.type = type; if (type == ButtonPress) @@ -2138,7 +2138,7 @@ XineramaTryClientEventsResult( * @param dontClient Don't deliver to the dontClient. */ int -MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, +MaybeDeliverEventsToClient(ProtocolWindowPtr pWin, xEvent *pEvents, int count, Mask filter, ClientPtr dontClient) { OtherClients *other; @@ -2179,9 +2179,9 @@ MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, return 2; } -static Window FindChildForEvent(SpritePtr pSprite, WindowPtr event) +static Window FindChildForEvent(SpritePtr pSprite, ProtocolWindowPtr event) { - WindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1]; + ProtocolWindowPtr w = pSprite->spriteTrace[pSprite->spriteTraceGood-1]; Window child = None; /* If the search ends up past the root should the child field be @@ -2221,7 +2221,7 @@ void FixUpEventFromWindow( SpritePtr pSprite, xEvent *xE, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child, Bool calcChild) { @@ -2298,7 +2298,7 @@ FixUpEventFromWindow( * ::EVENT_DONT_PROPAGATE_MASK. */ int -EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win) +EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, ProtocolWindowPtr win) { int rc = 0; int filter = 0; @@ -2366,8 +2366,8 @@ EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win) * @see DeliverFocusedEvent */ int -DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab, - WindowPtr stopAt, DeviceIntPtr dev) +DeliverDeviceEvents(ProtocolWindowPtr pWin, InternalEvent *event, GrabPtr grab, + ProtocolWindowPtr stopAt, DeviceIntPtr dev) { SpritePtr pSprite = dev->spriteInfo->sprite; Window child = None; @@ -2470,8 +2470,8 @@ unwind: * @param otherParent Used for ReparentNotify events. */ int -DeliverEvents(WindowPtr pWin, xEvent *xE, int count, - WindowPtr otherParent) +DeliverEvents(ProtocolWindowPtr pWin, xEvent *xE, int count, + ProtocolWindowPtr otherParent) { DeviceIntRec dummy; int deliveries; @@ -2541,7 +2541,7 @@ DeliverEvents(WindowPtr pWin, xEvent *xE, int count, static Bool -PointInBorderSize(WindowPtr pWin, int x, int y) +PointInBorderSize(ProtocolWindowPtr pWin, int x, int y) { BoxRec box; @@ -2577,10 +2577,10 @@ PointInBorderSize(WindowPtr pWin, int x, int y) * * @returns the window at the given coordinates. */ -WindowPtr +ProtocolWindowPtr XYToWindow(SpritePtr pSprite, int x, int y) { - WindowPtr pWin; + ProtocolWindowPtr pWin; BoxRec box; pSprite->spriteTraceGood = 1; /* root window still there */ @@ -2616,7 +2616,7 @@ XYToWindow(SpritePtr pSprite, int x, int y) { pSprite->spriteTraceSize += 10; pSprite->spriteTrace = realloc(pSprite->spriteTrace, - pSprite->spriteTraceSize*sizeof(WindowPtr)); + pSprite->spriteTraceSize*sizeof(ProtocolWindowPtr)); } pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin; pWin = pWin->firstChild; @@ -2635,7 +2635,7 @@ XYToWindow(SpritePtr pSprite, int x, int y) * @returns TRUE if the device has been grabbed, or FALSE otherwise. */ BOOL -ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) +ActivateFocusInGrab(DeviceIntPtr dev, ProtocolWindowPtr old, ProtocolWindowPtr win) { BOOL rc = FALSE; DeviceEvent event; @@ -2675,7 +2675,7 @@ ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) * @returns TRUE if the device has been grabbed, or FALSE otherwise. */ static BOOL -ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) +ActivateEnterGrab(DeviceIntPtr dev, ProtocolWindowPtr old, ProtocolWindowPtr win) { BOOL rc = FALSE; DeviceEvent event; @@ -2719,7 +2719,7 @@ ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) Bool CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) { - WindowPtr prevSpriteWin, newSpriteWin; + ProtocolWindowPtr prevSpriteWin, newSpriteWin; SpritePtr pSprite = pDev->spriteInfo->sprite; CHECKEVENT(ev); @@ -2807,7 +2807,7 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) } else sourceid = ev->sourceid; - if (prevSpriteWin != NullWindow) { + if (prevSpriteWin != NullProtocolWindow) { if (!ActivateEnterGrab(pDev, prevSpriteWin, newSpriteWin)) DoEnterLeaveEvents(pDev, sourceid, prevSpriteWin, newSpriteWin, NotifyNormal); @@ -2844,7 +2844,7 @@ WindowsRestructured(void) * other than 0,0, the information in the private sprite structure must * be updated accordingly, or XYToWindow (and other routines) will not * compute correctly. */ -void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) +void ReinitializeRootWindow(ProtocolWindowPtr win, int xoff, int yoff) { GrabPtr grab; DeviceIntPtr pDev; @@ -2908,7 +2908,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) * */ void -InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) +InitializeSprite(DeviceIntPtr pDev, ProtocolWindowPtr pWin) { SpritePtr pSprite; ScreenPtr pScreen; @@ -2957,7 +2957,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) if (pWin) { pCursor = wCursor(pWin); - pSprite->spriteTrace = (WindowPtr *)calloc(1, 32*sizeof(WindowPtr)); + pSprite->spriteTrace = (ProtocolWindowPtr *)calloc(1, 32*sizeof(ProtocolWindowPtr)); if (!pSprite->spriteTrace) FatalError("Failed to allocate spriteTrace"); pSprite->spriteTraceSize = 32; @@ -3003,7 +3003,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; pSprite->physLimits = pSprite->hotLimits; - pSprite->confineWin = NullWindow; + pSprite->confineWin = NullProtocolWindow; pSprite->hotShape = NullRegion; pSprite->screen = pScreen; /* gotta UNINIT these someplace */ @@ -3032,7 +3032,7 @@ void UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) { SpritePtr pSprite = NULL; - WindowPtr win = NULL; + ProtocolWindowPtr win = NULL; CursorPtr pCursor; if (!pScreen) return ; @@ -3086,7 +3086,7 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) * instantiated from. */ void -WindowHasNewCursor(WindowPtr pWin) +WindowHasNewCursor(ProtocolWindowPtr pWin) { DeviceIntPtr pDev; @@ -3135,7 +3135,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) static Bool XineramaPointInWindowIsVisible( - WindowPtr pWin, + ProtocolWindowPtr pWin, int x, int y ) @@ -3173,7 +3173,7 @@ XineramaPointInWindowIsVisible( static int XineramaWarpPointer(ClientPtr client) { - WindowPtr dest = NULL; + ProtocolWindowPtr dest = NULL; int x, y, rc; SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; @@ -3192,7 +3192,7 @@ XineramaWarpPointer(ClientPtr client) { int winX, winY; XID winID = stuff->srcWid; - WindowPtr source; + ProtocolWindowPtr source; rc = dixLookupWindow(&source, winID, client, DixReadAccess); if (rc != Success) @@ -3251,7 +3251,7 @@ XineramaWarpPointer(ClientPtr client) int ProcWarpPointer(ClientPtr client) { - WindowPtr dest = NULL; + ProtocolWindowPtr dest = NULL; int x, y, rc; ScreenPtr newScreen; DeviceIntPtr dev, tmp; @@ -3291,7 +3291,7 @@ ProcWarpPointer(ClientPtr client) { int winX, winY; XID winID = stuff->srcWid; - WindowPtr source; + ProtocolWindowPtr source; rc = dixLookupWindow(&source, winID, client, DixGetAttrAccess); if (rc != Success) @@ -3351,7 +3351,7 @@ ProcWarpPointer(ClientPtr client) } static Bool -BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) +BorderSizeNotEmpty(DeviceIntPtr pDev, ProtocolWindowPtr pWin) { if(RegionNotEmpty(&pWin->borderSize)) return TRUE; @@ -3384,7 +3384,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) GrabPtr CheckPassiveGrabsOnWindow( - WindowPtr pWin, + ProtocolWindowPtr pWin, DeviceIntPtr device, DeviceEvent *event, BOOL checkCore, @@ -3606,10 +3606,10 @@ CheckPassiveGrabsOnWindow( */ Bool -CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, WindowPtr ancestor) +CheckDeviceGrabs(DeviceIntPtr device, DeviceEvent *event, ProtocolWindowPtr ancestor) { int i; - WindowPtr pWin = NULL; + ProtocolWindowPtr pWin = NULL; FocusClassPtr focus = IsPointerEvent((InternalEvent*)event) ? NULL : device->focus; BOOL sendCore = (IsMaster(device) && device->coreEvents); Bool ret = FALSE; @@ -3681,10 +3681,10 @@ out: * @param window Window underneath the sprite. */ void -DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window) +DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, ProtocolWindowPtr window) { DeviceIntPtr ptr; - WindowPtr focus = keybd->focus->win; + ProtocolWindowPtr focus = keybd->focus->win; BOOL sendCore = (IsMaster(keybd) && keybd->coreEvents); xEvent *core = NULL, *xE = NULL, *xi2 = NULL; int count, rc; @@ -3696,7 +3696,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window) return; if (focus == PointerRootWin) { - DeliverDeviceEvents(window, event, NullGrab, NullWindow, keybd); + DeliverDeviceEvents(window, event, NullGrab, NullProtocolWindow, keybd); return; } if ((focus == window) || IsParent(focus, window)) @@ -3788,7 +3788,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, if (grab->ownerEvents) { - WindowPtr focus; + ProtocolWindowPtr focus; /* Hack: Some pointer device have a focus class. So we need to check * for the type of event, to see if we really want to deliver it to @@ -3806,7 +3806,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, focus = PointerRootWin; if (focus == PointerRootWin) deliveries = DeliverDeviceEvents(pSprite->win, event, grab, - NullWindow, thisDev); + NullProtocolWindow, thisDev); else if (focus && (focus == pSprite->win || IsParent(focus, pSprite->win))) deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus, @@ -3978,10 +3978,10 @@ FixKeyState (DeviceEvent *event, DeviceIntPtr keybd) * Traverses to siblings and parents of the window. */ void -RecalculateDeliverableEvents(WindowPtr pWin) +RecalculateDeliverableEvents(ProtocolWindowPtr pWin) { OtherClients *others; - WindowPtr pChild; + ProtocolWindowPtr pChild; pChild = pWin; while (1) @@ -4021,7 +4021,7 @@ int OtherClientGone(pointer value, XID id) { OtherClientsPtr other, prev; - WindowPtr pWin = (WindowPtr)value; + ProtocolWindowPtr pWin = (ProtocolWindowPtr)value; prev = 0; for (other = wOtherClients(pWin); other; other = other->next) @@ -4047,7 +4047,7 @@ OtherClientGone(pointer value, XID id) } int -EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) +EventSelectForWindow(ProtocolWindowPtr pWin, ClientPtr client, Mask mask) { Mask check; OtherClients * others; @@ -4123,7 +4123,7 @@ maskSet: for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->valuator && dev->valuator->motionHintWindow == pWin) - dev->valuator->motionHintWindow = NullWindow; + dev->valuator->motionHintWindow = NullProtocolWindow; } } RecalculateDeliverableEvents(pWin); @@ -4131,7 +4131,7 @@ maskSet: } int -EventSuppressForWindow(WindowPtr pWin, ClientPtr client, +EventSuppressForWindow(ProtocolWindowPtr pWin, ClientPtr client, Mask mask, Bool *checkOptional) { int i, free; @@ -4196,11 +4196,11 @@ CoreEnterLeaveEvent( int type, int mode, int detail, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child) { xEvent event; - WindowPtr focus; + ProtocolWindowPtr focus; DeviceIntPtr keybd; GrabPtr grab = mouse->deviceGrab.grab; Mask mask; @@ -4209,7 +4209,7 @@ CoreEnterLeaveEvent( if ((pWin == mouse->valuator->motionHintWindow) && (detail != NotifyInferior)) - mouse->valuator->motionHintWindow = NullWindow; + mouse->valuator->motionHintWindow = NullProtocolWindow; if (grab) { mask = (pWin == grab->window) ? grab->eventMask : 0; @@ -4281,7 +4281,7 @@ DeviceEnterLeaveEvent( int type, int mode, int detail, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child) { GrabPtr grab = mouse->deviceGrab.grab; @@ -4353,7 +4353,7 @@ out: } void -CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) +CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, ProtocolWindowPtr pWin) { xEvent event; @@ -4408,7 +4408,7 @@ SetInputFocus( Bool followOK) { FocusClassPtr focus; - WindowPtr focusWin; + ProtocolWindowPtr focusWin; int mode, rc; TimeStamp time; DeviceIntPtr keybd; /* used for FollowKeyboard or FollowKeyboardWin */ @@ -4431,7 +4431,7 @@ SetInputFocus( keybd = GetPairedDevice(dev); if ((focusID == None) || (focusID == PointerRoot)) - focusWin = (WindowPtr)(long)focusID; + focusWin = (ProtocolWindowPtr)(long)focusID; else if ((focusID == FollowKeyboard) && followOK) { focusWin = keybd->focus->win; @@ -4474,14 +4474,14 @@ SetInputFocus( else { int depth = 0; - WindowPtr pWin; + ProtocolWindowPtr pWin; for (pWin = focusWin; pWin; pWin = pWin->parent) depth++; if (depth > focus->traceSize) { focus->traceSize = depth+1; focus->trace = realloc(focus->trace, - focus->traceSize * sizeof(WindowPtr)); + focus->traceSize * sizeof(ProtocolWindowPtr)); } focus->traceGood = depth; for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) @@ -4554,7 +4554,7 @@ ProcGrabPointer(ClientPtr client) DeviceIntPtr device = PickPointer(client); GrabPtr grab; GrabMask mask; - WindowPtr confineTo; + ProtocolWindowPtr confineTo; CursorPtr oldCursor; REQUEST(xGrabPointerReq); TimeStamp time; @@ -4570,7 +4570,7 @@ ProcGrabPointer(ClientPtr client) } if (stuff->confineTo == None) - confineTo = NullWindow; + confineTo = NullProtocolWindow; else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, @@ -4716,7 +4716,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, unsigned ownerEvents, Time ctime, GrabMask *mask, int grabtype, Cursor curs, Window confineToWin, CARD8 *status) { - WindowPtr pWin, confineTo; + ProtocolWindowPtr pWin, confineTo; GrabPtr grab; TimeStamp time; Mask access_mode = DixGrabAccess; @@ -4746,7 +4746,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, return rc; if (confineToWin == None) - confineTo = NullWindow; + confineTo = NullProtocolWindow; else { rc = dixLookupWindow(&confineTo, confineToWin, client, @@ -4890,7 +4890,7 @@ int ProcQueryPointer(ClientPtr client) { xQueryPointerReply rep; - WindowPtr pWin, t; + ProtocolWindowPtr pWin, t; DeviceIntPtr mouse = PickPointer(client); DeviceIntPtr keyboard; SpritePtr pSprite; @@ -4987,7 +4987,7 @@ InitEvents(void) } syncEvents.replayDev = (DeviceIntPtr)NULL; - syncEvents.replayWin = NullWindow; + syncEvents.replayWin = NullProtocolWindow; while (syncEvents.pending) { QdEventPtr next = syncEvents.pending->next; @@ -5029,8 +5029,8 @@ CloseDownEvents(void) int ProcSendEvent(ClientPtr client) { - WindowPtr pWin; - WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ + ProtocolWindowPtr pWin; + ProtocolWindowPtr effectiveFocus = NullProtocolWindow; /* only set if dest==InputFocus */ DeviceIntPtr dev = PickPointer(client); DeviceIntPtr keybd = GetPairedDevice(dev); SpritePtr pSprite = dev->spriteInfo->sprite; @@ -5067,7 +5067,7 @@ ProcSendEvent(ClientPtr client) pWin = pSprite->win; else if (stuff->destination == InputFocus) { - WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin; + ProtocolWindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin; if (inputFocus == NoneWin) return Success; @@ -5129,7 +5129,7 @@ int ProcUngrabKey(ClientPtr client) { REQUEST(xUngrabKeyReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabRec tempGrab; DeviceIntPtr keybd = PickKeyboard(client); int rc; @@ -5178,7 +5178,7 @@ ProcUngrabKey(ClientPtr client) int ProcGrabKey(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xGrabKeyReq); GrabPtr grab; DeviceIntPtr keybd = PickKeyboard(client); @@ -5214,7 +5214,7 @@ ProcGrabKey(ClientPtr client) mask.core = (KeyPressMask | KeyReleaseMask); grab = CreateGrab(client->index, keybd, keybd, pWin, GRABTYPE_CORE, &mask, - ¶m, KeyPress, stuff->key, NullWindow, NullCursor); + ¶m, KeyPress, stuff->key, NullProtocolWindow, NullCursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); @@ -5230,7 +5230,7 @@ ProcGrabKey(ClientPtr client) int ProcGrabButton(ClientPtr client) { - WindowPtr pWin, confineTo; + ProtocolWindowPtr pWin, confineTo; REQUEST(xGrabButtonReq); CursorPtr cursor; GrabPtr grab; @@ -5273,7 +5273,7 @@ ProcGrabButton(ClientPtr client) if (rc != Success) return rc; if (stuff->confineTo == None) - confineTo = NullWindow; + confineTo = NullProtocolWindow; else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, DixSetAttrAccess); @@ -5329,7 +5329,7 @@ int ProcUngrabButton(ClientPtr client) { REQUEST(xUngrabButtonReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabRec tempGrab; int rc; DeviceIntPtr ptr; @@ -5376,9 +5376,9 @@ ProcUngrabButton(ClientPtr client) * deleted. */ void -DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) +DeleteWindowFromAnyEvents(ProtocolWindowPtr pWin, Bool freeResources) { - WindowPtr parent; + ProtocolWindowPtr parent; DeviceIntPtr mouse = inputInfo.pointer; DeviceIntPtr keybd = inputInfo.keyboard; FocusClassPtr focus; @@ -5418,7 +5418,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) /* If the focus window is a root window (ie. has no parent) then don't delete the focus from it. */ - if ((pWin == focus->win) && (pWin->parent != NullWindow)) + if ((pWin == focus->win) && (pWin->parent != NullProtocolWindow)) { int focusEventMode = NotifyNormal; @@ -5469,7 +5469,7 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) if (IsPointerDevice(keybd)) { if (keybd->valuator->motionHintWindow == pWin) - keybd->valuator->motionHintWindow = NullWindow; + keybd->valuator->motionHintWindow = NullProtocolWindow; } } @@ -5492,10 +5492,10 @@ DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) * window. */ void -CheckCursorConfinement(WindowPtr pWin) +CheckCursorConfinement(ProtocolWindowPtr pWin) { GrabPtr grab; - WindowPtr confineTo; + ProtocolWindowPtr confineTo; DeviceIntPtr pDev; #ifdef PANORAMIX @@ -5519,7 +5519,7 @@ CheckCursorConfinement(WindowPtr pWin) } Mask -EventMaskForClient(WindowPtr pWin, ClientPtr client) +EventMaskForClient(ProtocolWindowPtr pWin, ClientPtr client) { OtherClientsPtr other; diff --git a/dix/grabs.c b/dix/grabs.c index 69c58dff9..a9c7444fa 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -73,13 +73,13 @@ CreateGrab( int client, DeviceIntPtr device, DeviceIntPtr modDevice, - WindowPtr window, + ProtocolWindowPtr window, GrabType grabtype, GrabMask *mask, GrabParameters *param, int type, KeyCode keybut, /* key or button */ - WindowPtr confineTo, + ProtocolWindowPtr confineTo, CursorPtr cursor) { GrabPtr grab; diff --git a/dix/property.c b/dix/property.c index a1ae5305d..3b53c37ce 100644 --- a/dix/property.c +++ b/dix/property.c @@ -70,7 +70,7 @@ SOFTWARE. #ifdef notdef static void -PrintPropertys(WindowPtr pWin) +PrintPropertys(ProtocolWindowPtr pWin) { PropertyPtr pProp; int j; @@ -89,7 +89,7 @@ PrintPropertys(WindowPtr pWin) #endif int -dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, +dixLookupProperty(PropertyPtr *result, ProtocolWindowPtr pWin, Atom propertyName, ClientPtr client, Mask access_mode) { PropertyPtr pProp; @@ -107,7 +107,7 @@ dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, } static void -deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) +deliverPropertyNotifyEvent(ProtocolWindowPtr pWin, int state, Atom atom) { xEvent event; @@ -117,7 +117,7 @@ deliverPropertyNotifyEvent(WindowPtr pWin, int state, Atom atom) event.u.property.state = state; event.u.property.atom = atom; event.u.property.time = currentTime.milliseconds; - DeliverEvents(pWin, &event, 1, (WindowPtr)NULL); + DeliverEvents(pWin, &event, 1, (ProtocolWindowPtr)NULL); } int @@ -125,7 +125,7 @@ ProcRotateProperties(ClientPtr client) { int i, j, delta, rc; REQUEST(xRotatePropertiesReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; Atom * atoms; PropertyPtr * props; /* array of pointer */ PropertyPtr pProp, saved; @@ -196,7 +196,7 @@ out: int ProcChangeProperty(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; char format, mode; unsigned long len; int sizeInBytes, totalSize, err; @@ -248,7 +248,7 @@ ProcChangeProperty(ClientPtr client) } int -dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, +dixChangeWindowProperty(ClientPtr pClient, ProtocolWindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, pointer value, Bool sendevent) { @@ -372,7 +372,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } int -ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, +ChangeWindowProperty(ProtocolWindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, pointer value, Bool sendevent) { @@ -381,7 +381,7 @@ ChangeWindowProperty(WindowPtr pWin, Atom property, Atom type, int format, } int -DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) +DeleteProperty(ClientPtr client, ProtocolWindowPtr pWin, Atom propName) { PropertyPtr pProp, prevProp; int rc; @@ -411,7 +411,7 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) } void -DeleteAllWindowProperties(WindowPtr pWin) +DeleteAllWindowProperties(ProtocolWindowPtr pWin) { PropertyPtr pProp, pNextProp; @@ -461,7 +461,7 @@ ProcGetProperty(ClientPtr client) PropertyPtr pProp, prevProp; unsigned long n, len, ind; int rc; - WindowPtr pWin; + ProtocolWindowPtr pWin; xGetPropertyReply reply; Mask win_mode = DixGetPropAccess, prop_mode = DixReadAccess; REQUEST(xGetPropertyReq); @@ -582,7 +582,7 @@ ProcListProperties(ClientPtr client) Atom *pAtoms = NULL, *temppAtoms; xListPropertiesReply xlpr; int rc, numProps = 0; - WindowPtr pWin; + ProtocolWindowPtr pWin; PropertyPtr pProp, realProp; REQUEST(xResourceReq); @@ -625,7 +625,7 @@ ProcListProperties(ClientPtr client) int ProcDeleteProperty(ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xDeletePropertyReq); int result; diff --git a/dix/selection.c b/dix/selection.c index 87ed1abe9..19ad81a19 100644 --- a/dix/selection.c +++ b/dix/selection.c @@ -110,7 +110,7 @@ CallSelectionCallback(Selection *pSel, ClientPtr client, } void -DeleteWindowFromAnySelections(WindowPtr pWin) +DeleteWindowFromAnySelections(ProtocolWindowPtr pWin) { Selection *pSel; @@ -118,7 +118,7 @@ DeleteWindowFromAnySelections(WindowPtr pWin) if (pSel->pWin == pWin) { CallSelectionCallback(pSel, NULL, SelectionWindowDestroy); - pSel->pWin = (WindowPtr)NULL; + pSel->pWin = (ProtocolWindowPtr)NULL; pSel->window = None; pSel->client = NullClient; } @@ -133,7 +133,7 @@ DeleteClientFromAnySelections(ClientPtr client) if (pSel->client == client) { CallSelectionCallback(pSel, NULL, SelectionClientClose); - pSel->pWin = (WindowPtr)NULL; + pSel->pWin = (ProtocolWindowPtr)NULL; pSel->window = None; pSel->client = NullClient; } @@ -142,7 +142,7 @@ DeleteClientFromAnySelections(ClientPtr client) int ProcSetSelectionOwner(ClientPtr client) { - WindowPtr pWin = NULL; + ProtocolWindowPtr pWin = NULL; TimeStamp time; Selection *pSel; int rc; @@ -262,7 +262,7 @@ ProcConvertSelection(ClientPtr client) { Bool paramsOkay; xEvent event; - WindowPtr pWin; + ProtocolWindowPtr pWin; Selection *pSel; int rc; diff --git a/dix/window.c b/dix/window.c index cd28d054a..b77f2ad1e 100644 --- a/dix/window.c +++ b/dix/window.c @@ -143,11 +143,11 @@ Bool bgNoneRoot = FALSE; static unsigned char _back_lsb[4] = {0x88, 0x22, 0x44, 0x11}; static unsigned char _back_msb[4] = {0x11, 0x44, 0x22, 0x88}; -static Bool WindowParentHasDeviceCursor(WindowPtr pWin, +static Bool WindowParentHasDeviceCursor(ProtocolWindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCurs); static Bool -WindowSeekDeviceCursor(WindowPtr pWin, +WindowSeekDeviceCursor(ProtocolWindowPtr pWin, DeviceIntPtr pDev, DevCursNodePtr* pNode, DevCursNodePtr* pPrev); @@ -183,9 +183,9 @@ static Bool TileScreenSaver(ScreenPtr pScreen, int kind); ******/ static void -PrintChildren(WindowPtr p1, int indent) +PrintChildren(ProtocolWindowPtr p1, int indent) { - WindowPtr p2; + ProtocolWindowPtr p2; int i; while (p1) @@ -204,7 +204,7 @@ static void PrintWindowTree(void) { int i; - WindowPtr pWin, p1; + ProtocolWindowPtr pWin, p1; for (i=0; i<screenInfo.numScreens; i++) { @@ -218,10 +218,10 @@ PrintWindowTree(void) #endif int -TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) +TraverseTree(ProtocolWindowPtr pWin, VisitWindowProcPtr func, pointer data) { int result; - WindowPtr pChild; + ProtocolWindowPtr pChild; if (!(pChild = pWin)) return WT_NOMATCH; @@ -265,11 +265,11 @@ Bool disableBackingStore = FALSE; Bool enableBackingStore = FALSE; static void -SetWindowToDefaults(WindowPtr pWin) +SetWindowToDefaults(ProtocolWindowPtr pWin) { - pWin->prevSib = NullWindow; - pWin->firstChild = NullWindow; - pWin->lastChild = NullWindow; + pWin->prevSib = NullProtocolWindow; + pWin->firstChild = NullProtocolWindow; + pWin->lastChild = NullProtocolWindow; pWin->valdata = (ValidatePtr)NULL; pWin->optional = (WindowOptPtr)NULL; @@ -306,7 +306,7 @@ SetWindowToDefaults(WindowPtr pWin) } static void -MakeRootTile(WindowPtr pWin) +MakeRootTile(ProtocolWindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; GCPtr pGC; @@ -356,11 +356,11 @@ MakeRootTile(WindowPtr pWin) Bool CreateRootWindow(ScreenPtr pScreen) { - WindowPtr pWin; + ProtocolWindowPtr pWin; BoxRec box; PixmapFormatRec *format; - pWin = dixAllocateObjectWithPrivates(WindowRec, PRIVATE_WINDOW); + pWin = dixAllocateObjectWithPrivates(ProtocolWindowRec, PRIVATE_WINDOW); if (!pWin) return FALSE; @@ -383,7 +383,7 @@ CreateRootWindow(ScreenPtr pScreen) pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - pWin->parent = NullWindow; + pWin->parent = NullProtocolWindow; SetWindowToDefaults(pWin); pWin->optional = malloc(sizeof (WindowOptRec)); @@ -405,7 +405,7 @@ CreateRootWindow(ScreenPtr pScreen) pWin->optional->colormap = pScreen->defColormap; pWin->optional->visual = pScreen->rootVisual; - pWin->nextSib = NullWindow; + pWin->nextSib = NullProtocolWindow; pWin->drawable.id = FakeClientID(0); @@ -453,14 +453,14 @@ CreateRootWindow(ScreenPtr pScreen) } void -InitRootWindow(WindowPtr pWin) +InitRootWindow(ProtocolWindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; int backFlag = CWBorderPixel | CWCursor | CWBackingStore; - if (!(*pScreen->CreateWindow)(pWin)) + if (!(*pScreen->CreateWindow)((WindowPtr)pWin)) return; /* XXX */ - (*pScreen->PositionWindow)(pWin, 0, 0); + (*pScreen->PositionWindow)((WindowPtr)pWin, 0, 0); pWin->cursorIsNone = FALSE; pWin->optional->cursor = rootCursor; @@ -485,7 +485,7 @@ InitRootWindow(WindowPtr pWin) pWin->backingStore = defaultBackingStore; pWin->forcedBS = (defaultBackingStore != NotUseful); /* We SHOULD check for an error value here XXX */ - (*pScreen->ChangeWindowAttributes)(pWin, backFlag); + (*pScreen->ChangeWindowAttributes)((WindowPtr)pWin, backFlag); MapWindow(pWin, serverClient); } @@ -496,7 +496,7 @@ InitRootWindow(WindowPtr pWin) */ static void -ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn, +ClippedRegionFromBox(ProtocolWindowPtr pWin, RegionPtr Rgn, int x, int y, int w, int h) { @@ -530,8 +530,8 @@ RegisterRealChildHeadProc (RealChildHeadProc proc) } -WindowPtr -RealChildHead(WindowPtr pWin) +ProtocolWindowPtr +RealChildHead(ProtocolWindowPtr pWin) { if (realChildHeadProc) { return realChildHeadProc (pWin); @@ -542,7 +542,7 @@ RealChildHead(WindowPtr pWin) (HasSaverWindow (pWin->drawable.pScreen))) return pWin->firstChild; else - return NullWindow; + return NullProtocolWindow; } /***** @@ -550,13 +550,13 @@ RealChildHead(WindowPtr pWin) * Makes a window in response to client request *****/ -WindowPtr -CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, +ProtocolWindowPtr +CreateWindow(Window wid, ProtocolWindowPtr pParent, int x, int y, unsigned w, unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist, int depth, ClientPtr client, VisualID visual, int *error) { - WindowPtr pWin; - WindowPtr pHead; + ProtocolWindowPtr pWin; + ProtocolWindowPtr pHead; ScreenPtr pScreen; xEvent event; int idepth, ivisual; @@ -572,19 +572,19 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, { *error = BadValue; client->errorValue = class; - return NullWindow; + return NullProtocolWindow; } if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) { *error = BadMatch; - return NullWindow; + return NullProtocolWindow; } if ((class == InputOnly) && ((bw != 0) || (depth != 0))) { *error = BadMatch; - return NullWindow; + return NullProtocolWindow; } pScreen = pParent->drawable.pScreen; @@ -619,7 +619,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, if (fOK == FALSE) { *error = BadMatch; - return NullWindow; + return NullProtocolWindow; } } @@ -628,7 +628,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, (depth != pParent->drawable.depth)) { *error = BadMatch; - return NullWindow; + return NullProtocolWindow; } if (((vmask & CWColormap) == 0) && @@ -636,14 +636,14 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, ((visual != ancwopt->visual) || (ancwopt->colormap == None))) { *error = BadMatch; - return NullWindow; + return NullProtocolWindow; } - pWin = dixAllocateObjectWithPrivates(WindowRec, PRIVATE_WINDOW); + pWin = dixAllocateObjectWithPrivates(ProtocolWindowRec, PRIVATE_WINDOW); if (!pWin) { *error = BadAlloc; - return NullWindow; + return NullProtocolWindow; } pWin->drawable = pParent->drawable; pWin->drawable.depth = depth; @@ -671,7 +671,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, { dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); *error = BadAlloc; - return NullWindow; + return NullProtocolWindow; } pWin->optional->visual = visual; pWin->optional->colormap = None; @@ -685,7 +685,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, RT_WINDOW, pWin->parent, DixCreateAccess|DixSetAttrAccess); if (*error != Success) { dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); - return NullWindow; + return NullProtocolWindow; } pWin->backgroundState = XaceBackgroundNoneState(pWin); @@ -703,7 +703,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, pWin->drawable.x = pParent->drawable.x + x + (int)bw; pWin->drawable.y = pParent->drawable.y + y + (int)bw; - /* set up clip list correctly for unobscured WindowPtr */ + /* set up clip list correctly for unobscured ProtocolWindowPtr */ RegionNull(&pWin->clipList); RegionNull(&pWin->borderClip); RegionNull(&pWin->winSize); @@ -734,14 +734,14 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, SetBorderSize (pWin); /* We SHOULD check for an error value here XXX */ - if (!(*pScreen->CreateWindow)(pWin)) + if (!(*pScreen->CreateWindow)((WindowPtr)pWin)) { *error = BadAlloc; DeleteWindow(pWin, None); - return NullWindow; + return NullProtocolWindow; } /* We SHOULD check for an error value here XXX */ - (*pScreen->PositionWindow)(pWin, pWin->drawable.x, pWin->drawable.y); + (*pScreen->PositionWindow)((WindowPtr)pWin, pWin->drawable.x, pWin->drawable.y); if (!(vmask & CWEventMask)) RecalculateDeliverableEvents(pWin); @@ -754,7 +754,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, if (*error != Success) { DeleteWindow(pWin, None); - return NullWindow; + return NullProtocolWindow; } if (!(vmask & CWBackingStore) && (defaultBackingStore != NotUseful)) { @@ -775,13 +775,13 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, event.u.createNotify.height = h; event.u.createNotify.borderWidth = bw; event.u.createNotify.override = pWin->overrideRedirect; - DeliverEvents(pParent, &event, 1, NullWindow); + DeliverEvents(pParent, &event, 1, NullProtocolWindow); } return pWin; } static void -DisposeWindowOptional (WindowPtr pWin) +DisposeWindowOptional (ProtocolWindowPtr pWin) { if (!pWin->optional) return; @@ -818,7 +818,7 @@ DisposeWindowOptional (WindowPtr pWin) } static void -FreeWindowResources(WindowPtr pWin) +FreeWindowResources(ProtocolWindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; @@ -842,14 +842,14 @@ FreeWindowResources(WindowPtr pWin) DeleteAllWindowProperties(pWin); /* We SHOULD check for an error value here XXX */ - (*pScreen->DestroyWindow)(pWin); + (*pScreen->DestroyWindow)((WindowPtr)pWin); DisposeWindowOptional (pWin); } static void -CrushTree(WindowPtr pWin) +CrushTree(ProtocolWindowPtr pWin) { - WindowPtr pChild, pSib, pParent; + ProtocolWindowPtr pChild, pSib, pParent; UnrealizeWindowProcPtr UnrealizeWindow; xEvent event; @@ -871,7 +871,7 @@ CrushTree(WindowPtr pWin) memset(&event, 0, sizeof(xEvent)); event.u.u.type = DestroyNotify; event.u.destroyNotify.window = pChild->drawable.id; - DeliverEvents(pChild, &event, 1, NullWindow); + DeliverEvents(pChild, &event, 1, NullProtocolWindow); } FreeResource(pChild->drawable.id, RT_WINDOW); pSib = pChild->nextSib; @@ -879,15 +879,15 @@ CrushTree(WindowPtr pWin) if (pChild->realized) { pChild->realized = FALSE; - (*UnrealizeWindow)(pChild); + (*UnrealizeWindow)((WindowPtr)pChild); } FreeWindowResources(pChild); dixFreeObjectWithPrivates(pChild, PRIVATE_WINDOW); if ( (pChild = pSib) ) break; pChild = pParent; - pChild->firstChild = NullWindow; - pChild->lastChild = NullWindow; + pChild->firstChild = NullProtocolWindow; + pChild->lastChild = NullProtocolWindow; if (pChild == pWin) return; } @@ -903,8 +903,8 @@ CrushTree(WindowPtr pWin) int DeleteWindow(pointer value, XID wid) { - WindowPtr pParent; - WindowPtr pWin = (WindowPtr)value; + ProtocolWindowPtr pParent; + ProtocolWindowPtr pWin = (ProtocolWindowPtr)value; xEvent event; UnmapWindow(pWin, FALSE); @@ -917,7 +917,7 @@ DeleteWindow(pointer value, XID wid) memset(&event, 0, sizeof(xEvent)); event.u.u.type = DestroyNotify; event.u.destroyNotify.window = pWin->drawable.id; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } FreeWindowResources(pWin); @@ -939,7 +939,7 @@ DeleteWindow(pointer value, XID wid) } int -DestroySubwindows(WindowPtr pWin, ClientPtr client) +DestroySubwindows(ProtocolWindowPtr pWin, ClientPtr client) { /* XXX * The protocol is quite clear that each window should be @@ -962,7 +962,7 @@ DestroySubwindows(WindowPtr pWin, ClientPtr client) } static void -SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2) +SetRootWindowBackground(ProtocolWindowPtr pWin, ScreenPtr pScreen, Mask *index2) { /* following the protocol: "Changing the background of a root window to * None or ParentRelative restores the default background pixmap" */ @@ -990,14 +990,14 @@ SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2) *****/ int -ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) +ChangeWindowAttributes(ProtocolWindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) { XID *pVlist; PixmapPtr pPixmap; Pixmap pixID; CursorPtr pCursor, pOldCursor; Cursor cursorID; - WindowPtr pChild; + ProtocolWindowPtr pChild; Colormap cmap; ColormapPtr pCmap; xEvent xE; @@ -1336,7 +1336,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) xE.u.colormap.colormap = cmap; xE.u.colormap.new = xTrue; xE.u.colormap.state = IsMapInstalled(cmap, pWin); - DeliverEvents(pWin, &xE, 1, NullWindow); + DeliverEvents(pWin, &xE, 1, NullProtocolWindow); } break; case CWCursor: @@ -1439,7 +1439,7 @@ PatchUp: CheckWindowOptionalNeed (pWin); /* We SHOULD check for an error value here XXX */ - (*pScreen->ChangeWindowAttributes)(pWin, vmaskCopy); + (*pScreen->ChangeWindowAttributes)((WindowPtr)pWin, vmaskCopy); /* If the border contents have changed, redraw the border. @@ -1466,7 +1466,7 @@ PatchUp: *****/ void -GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa) +GetWindowAttributes(ProtocolWindowPtr pWin, ClientPtr client, xGetWindowAttributesReply *wa) { wa->type = X_Reply; wa->bitGravity = pWin->bitGravity; @@ -1501,15 +1501,15 @@ GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply } -WindowPtr -MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) +ProtocolWindowPtr +MoveWindowInStack(ProtocolWindowPtr pWin, ProtocolWindowPtr pNextSib) { - WindowPtr pParent = pWin->parent; - WindowPtr pFirstChange = pWin; /* highest window where list changes */ + ProtocolWindowPtr pParent = pWin->parent; + ProtocolWindowPtr pFirstChange = pWin; /* highest window where list changes */ if (pWin->nextSib != pNextSib) { - WindowPtr pOldNextSib = pWin->nextSib; + ProtocolWindowPtr pOldNextSib = pWin->nextSib; if (!pNextSib) /* move to bottom */ { @@ -1524,7 +1524,7 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) pWin->prevSib->nextSib = pWin->nextSib; pParent->lastChild->nextSib = pWin; pWin->prevSib = pParent->lastChild; - pWin->nextSib = NullWindow; + pWin->nextSib = NullProtocolWindow; pParent->lastChild = pWin; } else if (pParent->firstChild == pNextSib) /* move to top */ @@ -1537,15 +1537,15 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; pWin->nextSib = pParent->firstChild; - pWin->prevSib = (WindowPtr ) NULL; + pWin->prevSib = (ProtocolWindowPtr ) NULL; pNextSib->prevSib = pWin; pParent->firstChild = pWin; } else /* move in middle of list */ { - WindowPtr pOldNext = pWin->nextSib; + ProtocolWindowPtr pOldNext = pWin->nextSib; - pFirstChange = NullWindow; + pFirstChange = NullProtocolWindow; if (pParent->firstChild == pWin) pFirstChange = pParent->firstChild = pWin->nextSib; if (pParent->lastChild == pWin) { @@ -1568,7 +1568,7 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) } } if(pWin->drawable.pScreen->RestackWindow) - (*pWin->drawable.pScreen->RestackWindow)(pWin, pOldNextSib); + (*pWin->drawable.pScreen->RestackWindow)((WindowPtr)pWin, (WindowPtr)pOldNextSib); } #ifdef ROOTLESS @@ -1579,14 +1579,14 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) * the underlying window system may want to reorder it. */ else if (pWin->drawable.pScreen->RestackWindow) - (*pWin->drawable.pScreen->RestackWindow)(pWin, pWin->nextSib); + (*pWin->drawable.pScreen->RestackWindow)((WindowPtr)pWin, (WindowPtr)pWin->nextSib); #endif return pFirstChange; } void -SetWinSize (WindowPtr pWin) +SetWinSize (ProtocolWindowPtr pWin) { #ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) @@ -1624,7 +1624,7 @@ SetWinSize (WindowPtr pWin) } void -SetBorderSize (WindowPtr pWin) +SetBorderSize (ProtocolWindowPtr pWin) { int bw; @@ -1724,10 +1724,10 @@ GravityTranslate (int x, int y, int oldx, int oldy, /* XXX need to retile border on each window with ParentRelative origin */ void -ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) +ResizeChildrenWinSize(ProtocolWindowPtr pWin, int dx, int dy, int dw, int dh) { ScreenPtr pScreen; - WindowPtr pSib, pChild; + ProtocolWindowPtr pSib, pChild; Bool resized = (dw || dh); pScreen = pWin->drawable.pScreen; @@ -1750,7 +1750,7 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) event.u.gravity.window = pSib->drawable.id; event.u.gravity.x = cwsx - wBorderWidth (pSib); event.u.gravity.y = cwsy - wBorderWidth (pSib); - DeliverEvents (pSib, &event, 1, NullWindow); + DeliverEvents (pSib, &event, 1, NullProtocolWindow); pSib->origin.x = cwsx; pSib->origin.y = cwsy; } @@ -1759,7 +1759,7 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) pSib->drawable.y = pWin->drawable.y + pSib->origin.y; SetWinSize (pSib); SetBorderSize (pSib); - (*pScreen->PositionWindow)(pSib, pSib->drawable.x, pSib->drawable.y); + (*pScreen->PositionWindow)((WindowPtr)pSib, pSib->drawable.x, pSib->drawable.y); if ( (pChild = pSib->firstChild) ) { @@ -1771,7 +1771,7 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) pChild->origin.y; SetWinSize (pChild); SetBorderSize (pChild); - (*pScreen->PositionWindow)(pChild, + (*pScreen->PositionWindow)((WindowPtr)pChild, pChild->drawable.x, pChild->drawable.y); if (pChild->firstChild) { @@ -1819,10 +1819,10 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) static int IsSiblingAboveMe( - WindowPtr pMe, - WindowPtr pSib) + ProtocolWindowPtr pMe, + ProtocolWindowPtr pSib) { - WindowPtr pWin; + ProtocolWindowPtr pWin; pWin = pMe->parent->firstChild; while (pWin) @@ -1838,7 +1838,7 @@ IsSiblingAboveMe( static BoxPtr WindowExtents( - WindowPtr pWin, + ProtocolWindowPtr pWin, BoxPtr pBox) { pBox->x1 = pWin->drawable.x - wBorderWidth (pWin); @@ -1854,7 +1854,7 @@ WindowExtents( static RegionPtr MakeBoundingRegion ( - WindowPtr pWin, + ProtocolWindowPtr pWin, BoxPtr pBox) { RegionPtr pRgn = RegionCreate(pBox, 1); @@ -1868,9 +1868,9 @@ MakeBoundingRegion ( static Bool ShapeOverlap ( - WindowPtr pWin, + ProtocolWindowPtr pWin, BoxPtr pWinBox, - WindowPtr pSib, + ProtocolWindowPtr pSib, BoxPtr pSibBox) { RegionPtr pWinRgn, pSibRgn; @@ -1889,11 +1889,11 @@ ShapeOverlap ( static Bool AnyWindowOverlapsMe( - WindowPtr pWin, - WindowPtr pHead, + ProtocolWindowPtr pWin, + ProtocolWindowPtr pHead, BoxPtr box) { - WindowPtr pSib; + ProtocolWindowPtr pSib; BoxRec sboxrec; BoxPtr sbox; @@ -1913,10 +1913,10 @@ AnyWindowOverlapsMe( static Bool IOverlapAnyWindow( - WindowPtr pWin, + ProtocolWindowPtr pWin, BoxPtr box) { - WindowPtr pSib; + ProtocolWindowPtr pSib; BoxRec sboxrec; BoxPtr sbox; @@ -1962,10 +1962,10 @@ IOverlapAnyWindow( * */ -static WindowPtr +static ProtocolWindowPtr WhereDoIGoInTheStack( - WindowPtr pWin, - WindowPtr pSib, + ProtocolWindowPtr pWin, + ProtocolWindowPtr pSib, short x, short y, unsigned short w, @@ -1973,11 +1973,11 @@ WhereDoIGoInTheStack( int smode) { BoxRec box; - WindowPtr pHead, pFirst; + ProtocolWindowPtr pHead, pFirst; if ((pWin == pWin->parent->firstChild) && (pWin == pWin->parent->lastChild)) - return((WindowPtr ) NULL); + return((ProtocolWindowPtr ) NULL); pHead = RealChildHead(pWin->parent); pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; box.x1 = x; @@ -2000,7 +2000,7 @@ WhereDoIGoInTheStack( else return pWin->nextSib; else - return NullWindow; + return NullProtocolWindow; case TopIf: if ((!pWin->mapped || (pSib && !pSib->mapped))) return pWin->nextSib; @@ -2023,12 +2023,12 @@ WhereDoIGoInTheStack( { if ((IsSiblingAboveMe(pWin, pSib) == Below) && (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) - return NullWindow; + return NullProtocolWindow; else return pWin->nextSib; } else if (IOverlapAnyWindow(pWin, &box)) - return NullWindow; + return NullProtocolWindow; else return pWin->nextSib; case Opposite: @@ -2041,7 +2041,7 @@ WhereDoIGoInTheStack( if (IsSiblingAboveMe(pWin, pSib) == Above) return pFirst; else - return NullWindow; + return NullProtocolWindow; } else return pWin->nextSib; @@ -2055,7 +2055,7 @@ WhereDoIGoInTheStack( return pFirst; } else if (IOverlapAnyWindow(pWin, &box)) - return NullWindow; + return NullProtocolWindow; else return pWin->nextSib; default: @@ -2068,16 +2068,16 @@ WhereDoIGoInTheStack( static void ReflectStackChange( - WindowPtr pWin, - WindowPtr pSib, + ProtocolWindowPtr pWin, + ProtocolWindowPtr pSib, VTKind kind) { /* Note that pSib might be NULL */ Bool WasViewable = (Bool)pWin->viewable; Bool anyMarked; - WindowPtr pFirstChange; - WindowPtr pLayerWin; + ProtocolWindowPtr pFirstChange; + ProtocolWindowPtr pLayerWin; ScreenPtr pScreen = pWin->drawable.pScreen; /* if this is a root window, can't be restacked */ @@ -2088,16 +2088,16 @@ ReflectStackChange( if (WasViewable) { - anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, - &pLayerWin); + anyMarked = (*pScreen->MarkOverlappedWindows)((WindowPtr)pWin, (WindowPtr)pFirstChange, + (WindowPtr *)&pLayerWin); if (pLayerWin != pWin) pFirstChange = pLayerWin; if (anyMarked) { - (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, kind); - (*pScreen->HandleExposures)(pLayerWin->parent); + (*pScreen->ValidateTree)((WindowPtr)pLayerWin->parent,(WindowPtr) pFirstChange, kind); + (*pScreen->HandleExposures)((WindowPtr)pLayerWin->parent); } if (anyMarked && pWin->drawable.pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, kind); + (*pScreen->PostValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pFirstChange, kind); } if (pWin->realized) WindowsRestructured (); @@ -2108,14 +2108,14 @@ ReflectStackChange( *****/ int -ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) +ConfigureWindow(ProtocolWindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) { #define RESTACK_WIN 0 #define MOVE_WIN 1 #define RESIZE_WIN 2 #define REBORDER_WIN 3 - WindowPtr pSib = NullWindow; - WindowPtr pParent = pWin->parent; + ProtocolWindowPtr pSib = NullProtocolWindow; + ProtocolWindowPtr pParent = pWin->parent; Window sibwid = 0; Mask index2, tmask; XID *pVlist; @@ -2307,7 +2307,7 @@ ActuallyDoSomething: if (pWin->drawable.pScreen->ConfigNotify) { int ret; - ret = (*pWin->drawable.pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + ret = (*pWin->drawable.pScreen->ConfigNotify)((WindowPtr)pWin, x, y, w, h, bw, (WindowPtr)pSib); if (ret) { client->errorValue = 0; return ret; @@ -2335,7 +2335,7 @@ ActuallyDoSomething: event.u.configureNotify.height = h; event.u.configureNotify.borderWidth = bw; event.u.configureNotify.override = pWin->overrideRedirect; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } if (mask & CWBorderWidth) { @@ -2349,16 +2349,16 @@ ActuallyDoSomething: (beforeY + wBorderWidth (pWin) == y + (int)bw)) { action = REBORDER_WIN; - (*pWin->drawable.pScreen->ChangeBorderWidth)(pWin, bw); + (*pWin->drawable.pScreen->ChangeBorderWidth)((WindowPtr)pWin, bw); } else pWin->borderWidth = bw; } if (action == MOVE_WIN) - (*pWin->drawable.pScreen->MoveWindow)(pWin, x, y, pSib, + (*pWin->drawable.pScreen->MoveWindow)((WindowPtr)pWin, x, y, (WindowPtr)pSib, (mask & CWBorderWidth) ? VTOther : VTMove); else if (action == RESIZE_WIN) - (*pWin->drawable.pScreen->ResizeWindow)(pWin, x, y, w, h, pSib); + (*pWin->drawable.pScreen->ResizeWindow)((WindowPtr)pWin, x, y, w, h, (WindowPtr)pSib); else if (mask & CWStackMode) ReflectStackChange(pWin, pSib, VTOther); @@ -2383,9 +2383,9 @@ ActuallyDoSomething: ******/ int -CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) +CirculateWindow(ProtocolWindowPtr pParent, int direction, ClientPtr client) { - WindowPtr pWin, pHead, pFirst; + ProtocolWindowPtr pWin, pHead, pFirst; xEvent event; BoxRec box; @@ -2429,9 +2429,9 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) } event.u.u.type = CirculateNotify; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); ReflectStackChange(pWin, - (direction == RaiseLowest) ? pFirst : NullWindow, + (direction == RaiseLowest) ? pFirst : NullProtocolWindow, VTStack); return Success; @@ -2439,7 +2439,7 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) static int CompareWIDs( - WindowPtr pWin, + ProtocolWindowPtr pWin, pointer value) /* must conform to VisitWindowProcPtr */ { Window *wid = (Window *)value; @@ -2455,10 +2455,10 @@ CompareWIDs( *****/ int -ReparentWindow(WindowPtr pWin, WindowPtr pParent, +ReparentWindow(ProtocolWindowPtr pWin, ProtocolWindowPtr pParent, int x, int y, ClientPtr client) { - WindowPtr pPrev, pPriorParent; + ProtocolWindowPtr pPrev, pPriorParent; Bool WasMapped = (Bool)(pWin->mapped); xEvent event; int bw = wBorderWidth (pWin); @@ -2517,7 +2517,7 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, else { pWin->nextSib = pParent->firstChild; - pWin->prevSib = NullWindow; + pWin->prevSib = NullProtocolWindow; if (pParent->firstChild) pParent->firstChild->prevSib = pWin; else @@ -2535,8 +2535,8 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, SetBorderSize (pWin); if (pScreen->ReparentWindow) - (*pScreen->ReparentWindow)(pWin, pPriorParent); - (*pScreen->PositionWindow)(pWin, pWin->drawable.x, pWin->drawable.y); + (*pScreen->ReparentWindow)((WindowPtr)pWin, (WindowPtr)pPriorParent); + (*pScreen->PositionWindow)((WindowPtr)pWin, pWin->drawable.x, pWin->drawable.y); ResizeChildrenWinSize(pWin, 0, 0, 0, 0); CheckWindowOptionalNeed(pWin); @@ -2548,9 +2548,9 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, } static void -RealizeTree(WindowPtr pWin) +RealizeTree(ProtocolWindowPtr pWin) { - WindowPtr pChild; + ProtocolWindowPtr pChild; RealizeWindowProcPtr Realize; Realize = pWin->drawable.pScreen->RealizeWindow; @@ -2561,7 +2561,7 @@ RealizeTree(WindowPtr pWin) { pChild->realized = TRUE; pChild->viewable = (pChild->drawable.class == InputOutput); - (* Realize)(pChild); + (* Realize)((WindowPtr)pChild); if (pChild->firstChild) { pChild = pChild->firstChild; @@ -2576,10 +2576,10 @@ RealizeTree(WindowPtr pWin) } } -static WindowPtr windowDisableMapUnmapEvents; +static ProtocolWindowPtr windowDisableMapUnmapEvents; void -DisableMapUnmapEvents(WindowPtr pWin) +DisableMapUnmapEvents(ProtocolWindowPtr pWin) { assert (windowDisableMapUnmapEvents == NULL); @@ -2587,7 +2587,7 @@ DisableMapUnmapEvents(WindowPtr pWin) } void -EnableMapUnmapEvents(WindowPtr pWin) +EnableMapUnmapEvents(ProtocolWindowPtr pWin) { assert (windowDisableMapUnmapEvents != NULL); @@ -2595,7 +2595,7 @@ EnableMapUnmapEvents(WindowPtr pWin) } static Bool -MapUnmapEventsEnabled(WindowPtr pWin) +MapUnmapEventsEnabled(ProtocolWindowPtr pWin) { return pWin != windowDisableMapUnmapEvents; } @@ -2609,12 +2609,12 @@ MapUnmapEventsEnabled(WindowPtr pWin) *****/ int -MapWindow(WindowPtr pWin, ClientPtr client) +MapWindow(ProtocolWindowPtr pWin, ClientPtr client) { ScreenPtr pScreen; - WindowPtr pParent; - WindowPtr pLayerWin; + ProtocolWindowPtr pParent; + ProtocolWindowPtr pLayerWin; if (pWin->mapped) return Success; @@ -2651,7 +2651,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) event.u.u.type = MapNotify; event.u.mapNotify.window = pWin->drawable.id; event.u.mapNotify.override = pWin->overrideRedirect; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } if (!pParent->realized) @@ -2659,15 +2659,15 @@ MapWindow(WindowPtr pWin, ClientPtr client) RealizeTree(pWin); if (pWin->viewable) { - anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, - &pLayerWin); + anyMarked = (*pScreen->MarkOverlappedWindows)((WindowPtr)pWin, (WindowPtr)pWin, + (WindowPtr *)&pLayerWin); if (anyMarked) { - (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTMap); - (*pScreen->HandleExposures)(pLayerWin->parent); + (*pScreen->ValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pLayerWin, VTMap); + (*pScreen->HandleExposures)((WindowPtr)pLayerWin->parent); } if (anyMarked && pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, VTMap); + (*pScreen->PostValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pLayerWin, VTMap); } WindowsRestructured (); } @@ -2679,14 +2679,14 @@ MapWindow(WindowPtr pWin, ClientPtr client) pWin->realized = TRUE; /* for roots */ pWin->viewable = pWin->drawable.class == InputOutput; /* We SHOULD check for an error value here XXX */ - (*pScreen->RealizeWindow)(pWin); + (*pScreen->RealizeWindow)((WindowPtr)pWin); if (pScreen->ClipNotify) - (*pScreen->ClipNotify) (pWin, 0, 0); + (*pScreen->ClipNotify) ((WindowPtr)pWin, 0, 0); if (pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(NullWindow, pWin, VTMap); + (*pScreen->PostValidateTree)(NullWindow, (WindowPtr)pWin, VTMap); RegionNull(&temp); RegionCopy(&temp, &pWin->clipList); - (*pScreen->WindowExposures) (pWin, &temp, NullRegion); + (*pScreen->WindowExposures) ((WindowPtr)pWin, &temp, NullRegion); RegionUninit(&temp); } @@ -2701,16 +2701,16 @@ MapWindow(WindowPtr pWin, ClientPtr client) *****/ void -MapSubwindows(WindowPtr pParent, ClientPtr client) +MapSubwindows(ProtocolWindowPtr pParent, ClientPtr client) { - WindowPtr pWin; - WindowPtr pFirstMapped = NullWindow; + ProtocolWindowPtr pWin; + ProtocolWindowPtr pFirstMapped = NullProtocolWindow; ScreenPtr pScreen; Mask parentRedirect; Mask parentNotify; xEvent event; Bool anyMarked; - WindowPtr pLayerWin; + ProtocolWindowPtr pLayerWin; pScreen = pParent->drawable.pScreen; parentRedirect = RedirectSend(pParent); @@ -2739,7 +2739,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) event.u.u.type = MapNotify; event.u.mapNotify.window = pWin->drawable.id; event.u.mapNotify.override = pWin->overrideRedirect; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } if (!pFirstMapped) @@ -2749,7 +2749,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) RealizeTree(pWin); if (pWin->viewable) { - anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, + anyMarked |= (*pScreen->MarkOverlappedWindows)((WindowPtr)pWin, (WindowPtr)pWin, (WindowPtr *)NULL); } } @@ -2758,20 +2758,20 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) if (pFirstMapped) { - pLayerWin = (*pScreen->GetLayerWindow)(pParent); + pLayerWin = (ProtocolWindowPtr)(*pScreen->GetLayerWindow)((WindowPtr)pParent); if (pLayerWin->parent != pParent) { - anyMarked |= (*pScreen->MarkOverlappedWindows)(pLayerWin, - pLayerWin, + anyMarked |= (*pScreen->MarkOverlappedWindows)((WindowPtr)pLayerWin, + (WindowPtr)pLayerWin, (WindowPtr *)NULL); pFirstMapped = pLayerWin; } if (anyMarked) { - (*pScreen->ValidateTree)(pLayerWin->parent, pFirstMapped, VTMap); - (*pScreen->HandleExposures)(pLayerWin->parent); + (*pScreen->ValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pFirstMapped, VTMap); + (*pScreen->HandleExposures)((WindowPtr)pLayerWin->parent); } if (anyMarked && pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstMapped, + (*pScreen->PostValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pFirstMapped, VTMap); WindowsRestructured (); } @@ -2779,10 +2779,10 @@ MapSubwindows(WindowPtr pParent, ClientPtr client) static void UnrealizeTree( - WindowPtr pWin, + ProtocolWindowPtr pWin, Bool fromConfigure) { - WindowPtr pChild; + ProtocolWindowPtr pChild; UnrealizeWindowProcPtr Unrealize; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; @@ -2805,13 +2805,14 @@ UnrealizeTree( win->u.win.visibility = VisibilityNotViewable; } #endif - (* Unrealize)(pChild); + + (* Unrealize)((WindowPtr)pChild); if (MapUnmapEventsEnabled(pWin)) DeleteWindowFromAnyEvents(pChild, FALSE); if (pChild->viewable) { pChild->viewable = FALSE; - (* MarkUnrealizedWindow)(pChild, pWin, fromConfigure); + (* MarkUnrealizedWindow)((WindowPtr)pChild, scrnWindow(pWin), fromConfigure); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; } if (pChild->firstChild) @@ -2836,14 +2837,14 @@ UnrealizeTree( *****/ int -UnmapWindow(WindowPtr pWin, Bool fromConfigure) +UnmapWindow(ProtocolWindowPtr pWin, Bool fromConfigure) { - WindowPtr pParent; + ProtocolWindowPtr pParent; xEvent event; Bool wasRealized = (Bool)pWin->realized; Bool wasViewable = (Bool)pWin->viewable; ScreenPtr pScreen = pWin->drawable.pScreen; - WindowPtr pLayerWin = pWin; + ProtocolWindowPtr pLayerWin = pWin; if ((!pWin->mapped) || (!(pParent = pWin->parent))) return Success; @@ -2853,13 +2854,13 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) event.u.u.type = UnmapNotify; event.u.unmapNotify.window = pWin->drawable.id; event.u.unmapNotify.fromConfigure = fromConfigure; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } if (wasViewable && !fromConfigure) { pWin->valdata = UnmapValData; - (*pScreen->MarkOverlappedWindows)(pWin, pWin->nextSib, &pLayerWin); - (*pScreen->MarkWindow)(pLayerWin->parent); + (*pScreen->MarkOverlappedWindows)((WindowPtr)pWin, (WindowPtr)pWin->nextSib, (WindowPtr *)&pLayerWin); + (*pScreen->MarkWindow)((WindowPtr)pLayerWin->parent); } pWin->mapped = FALSE; if (wasRealized) @@ -2868,11 +2869,11 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) { if (!fromConfigure) { - (*pScreen->ValidateTree)(pLayerWin->parent, pWin, VTUnmap); - (*pScreen->HandleExposures)(pLayerWin->parent); + (*pScreen->ValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pWin, VTUnmap); + (*pScreen->HandleExposures)((WindowPtr)pLayerWin->parent); } if (!fromConfigure && pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pLayerWin->parent, pWin, VTUnmap); + (*pScreen->PostValidateTree)((WindowPtr)pLayerWin->parent,(WindowPtr)pWin, VTUnmap); } if (wasRealized && !fromConfigure) WindowsRestructured (); @@ -2886,15 +2887,15 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) *****/ void -UnmapSubwindows(WindowPtr pWin) +UnmapSubwindows(ProtocolWindowPtr pWin) { - WindowPtr pChild, pHead; + ProtocolWindowPtr pChild, pHead; xEvent event; Bool wasRealized = (Bool)pWin->realized; Bool wasViewable = (Bool)pWin->viewable; Bool anyMarked = FALSE; Mask parentNotify; - WindowPtr pLayerWin = NULL; + ProtocolWindowPtr pLayerWin = NULL; ScreenPtr pScreen = pWin->drawable.pScreen; if (!pWin->firstChild) @@ -2903,7 +2904,7 @@ UnmapSubwindows(WindowPtr pWin) pHead = RealChildHead(pWin); if (wasViewable) - pLayerWin = (*pScreen->GetLayerWindow)(pWin); + pLayerWin = (ProtocolWindowPtr)(*pScreen->GetLayerWindow)((WindowPtr)pWin); for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) { @@ -2914,7 +2915,7 @@ UnmapSubwindows(WindowPtr pWin) event.u.u.type = UnmapNotify; event.u.unmapNotify.window = pChild->drawable.id; event.u.unmapNotify.fromConfigure = xFalse; - DeliverEvents(pChild, &event, 1, NullWindow); + DeliverEvents(pChild, &event, 1, NullProtocolWindow); } if (pChild->viewable) { @@ -2934,29 +2935,29 @@ UnmapSubwindows(WindowPtr pWin) if (anyMarked) { if (pLayerWin->parent == pWin) - (*pScreen->MarkWindow)(pWin); + (*pScreen->MarkWindow)((WindowPtr)pWin); else { - WindowPtr ptmp; - (*pScreen->MarkOverlappedWindows)(pWin, pLayerWin, + ProtocolWindowPtr ptmp; + (*pScreen->MarkOverlappedWindows)((WindowPtr)pWin, (WindowPtr)pLayerWin, (WindowPtr *)NULL); - (*pScreen->MarkWindow)(pLayerWin->parent); + (*pScreen->MarkWindow)((WindowPtr)pLayerWin->parent); /* Windows between pWin and pLayerWin may not have been marked */ ptmp = pWin; while (ptmp != pLayerWin->parent) { - (*pScreen->MarkWindow)(ptmp); + (*pScreen->MarkWindow)((WindowPtr)ptmp); ptmp = ptmp->parent; } pHead = pWin->firstChild; } - (*pScreen->ValidateTree)(pLayerWin->parent, pHead, VTUnmap); - (*pScreen->HandleExposures)(pLayerWin->parent); + (*pScreen->ValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pHead, VTUnmap); + (*pScreen->HandleExposures)((WindowPtr)pLayerWin->parent); } if (anyMarked && pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pLayerWin->parent, pHead, VTUnmap); + (*pScreen->PostValidateTree)((WindowPtr)pLayerWin->parent, (WindowPtr)pHead, VTUnmap); } if (wasRealized) WindowsRestructured (); @@ -2966,7 +2967,7 @@ UnmapSubwindows(WindowPtr pWin) void HandleSaveSet(ClientPtr client) { - WindowPtr pParent, pWin; + ProtocolWindowPtr pParent, pWin; int j; for (j=0; j<client->numSaved; j++) @@ -3014,7 +3015,7 @@ HandleSaveSet(ClientPtr client) * \param x,y in root */ Bool -PointInWindowIsVisible(WindowPtr pWin, int x, int y) +PointInWindowIsVisible(ProtocolWindowPtr pWin, int x, int y) { BoxRec box; @@ -3032,7 +3033,7 @@ PointInWindowIsVisible(WindowPtr pWin, int x, int y) RegionPtr -NotClippedByChildren(WindowPtr pWin) +NotClippedByChildren(ProtocolWindowPtr pWin) { RegionPtr pReg = RegionCreate(NullBox, 1); if (pWin->parent || @@ -3045,7 +3046,7 @@ NotClippedByChildren(WindowPtr pWin) } void -SendVisibilityNotify(WindowPtr pWin) +SendVisibilityNotify(ProtocolWindowPtr pWin) { xEvent event; unsigned int visibility = pWin->visibility; @@ -3056,7 +3057,7 @@ SendVisibilityNotify(WindowPtr pWin) /* This is not quite correct yet, but it's close */ if(!noPanoramiXExtension) { PanoramiXRes *win; - WindowPtr pWin2; + ProtocolWindowPtr pWin2; int rc, i, Scrnum; Scrnum = pWin->drawable.pScreen->myNum; @@ -3114,7 +3115,7 @@ SendVisibilityNotify(WindowPtr pWin) event.u.u.type = VisibilityNotify; event.u.visibility.window = pWin->drawable.id; event.u.visibility.state = visibility; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } #define RANDOM_WIDTH 32 @@ -3166,14 +3167,14 @@ dixSaveScreens(ClientPtr client, int on, int mode) } else if (HasSaverWindow (pScreen)) { - pScreen->screensaver.pWindow = NullWindow; + pScreen->screensaver.pWindow = NullProtocolWindow; FreeResource(pScreen->screensaver.wid, RT_NONE); } break; case SCREEN_SAVER_CYCLE: if (pScreen->screensaver.blanked == SCREEN_IS_TILED) { - WindowPtr pWin = pScreen->screensaver.pWindow; + WindowPtr pWin = (WindowPtr)pScreen->screensaver.pWindow; /* make it look like screen saver is off, so that * NotClippedByChildren will compute a clip list * for the root window, so miPaintWindow works @@ -3243,7 +3244,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind) int result; XID attributes[3]; Mask mask; - WindowPtr pWin; + ProtocolWindowPtr pWin; CursorMetricRec cm; unsigned char *srcbits, *mskbits; CursorPtr cursor; @@ -3337,7 +3338,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind) if (mask & CWBackPixmap) { MakeRootTile (pWin); - (*pWin->drawable.pScreen->ChangeWindowAttributes)(pWin, CWBackPixmap); + (*pWin->drawable.pScreen->ChangeWindowAttributes)((WindowPtr)pWin, CWBackPixmap); } MapWindow(pWin, serverClient); return TRUE; @@ -3351,8 +3352,8 @@ TileScreenSaver(ScreenPtr pScreen, int kind) * contain the structure. */ -WindowPtr -FindWindowWithOptional (WindowPtr w) +ProtocolWindowPtr +FindWindowWithOptional (ProtocolWindowPtr w) { do w = w->parent; @@ -3369,7 +3370,7 @@ FindWindowWithOptional (WindowPtr w) */ void -CheckWindowOptionalNeed (WindowPtr w) +CheckWindowOptionalNeed (ProtocolWindowPtr w) { WindowOptPtr optional; WindowOptPtr parentOptional; @@ -3430,7 +3431,7 @@ CheckWindowOptionalNeed (WindowPtr w) */ Bool -MakeWindowOptional (WindowPtr pWin) +MakeWindowOptional (ProtocolWindowPtr pWin) { WindowOptPtr optional; WindowOptPtr parentOptional; @@ -3484,14 +3485,14 @@ MakeWindowOptional (WindowPtr pWin) * cursor. If the cursor is set to None, it is inherited by the parent. */ int -ChangeWindowDeviceCursor(WindowPtr pWin, +ChangeWindowDeviceCursor(ProtocolWindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor) { DevCursNodePtr pNode, pPrev; CursorPtr pOldCursor = NULL; ScreenPtr pScreen; - WindowPtr pChild; + ProtocolWindowPtr pChild; if (!pWin->optional && !MakeWindowOptional(pWin)) return BadAlloc; @@ -3583,14 +3584,14 @@ out: /* FIXME: We SHOULD check for an error value here XXX (comment taken from ChangeWindowAttributes) */ - (*pScreen->ChangeWindowAttributes)(pWin, CWCursor); + (*pScreen->ChangeWindowAttributes)((WindowPtr)pWin, CWCursor); return Success; } /* Get device cursor for given device or None if none is set */ CursorPtr -WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) +WindowGetDeviceCursor(ProtocolWindowPtr pWin, DeviceIntPtr pDev) { DevCursorList pList; @@ -3619,7 +3620,7 @@ WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) * If the device is the first in list, pPrev is set to NULL. */ static Bool -WindowSeekDeviceCursor(WindowPtr pWin, +WindowSeekDeviceCursor(ProtocolWindowPtr pWin, DeviceIntPtr pDev, DevCursNodePtr* pNode, DevCursNodePtr* pPrev) @@ -3658,11 +3659,11 @@ WindowSeekDeviceCursor(WindowPtr pWin, * otherwise */ static Bool -WindowParentHasDeviceCursor(WindowPtr pWin, +WindowParentHasDeviceCursor(ProtocolWindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor) { - WindowPtr pParent; + ProtocolWindowPtr pParent; DevCursNodePtr pParentNode, pParentPrev; pParent = pWin->parent; @@ -3695,11 +3696,11 @@ WindowParentHasDeviceCursor(WindowPtr pWin, void SetRootClip(ScreenPtr pScreen, Bool enable) { - WindowPtr pWin = pScreen->root; - WindowPtr pChild; + ProtocolWindowPtr pWin = pScreen->root; + ProtocolWindowPtr pChild; Bool WasViewable; Bool anyMarked = FALSE; - WindowPtr pLayerWin; + ProtocolWindowPtr pLayerWin; BoxRec box; if (!pWin) @@ -3709,11 +3710,11 @@ SetRootClip(ScreenPtr pScreen, Bool enable) { for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { - (void) (*pScreen->MarkOverlappedWindows)(pChild, - pChild, - &pLayerWin); + (void) (*pScreen->MarkOverlappedWindows)((WindowPtr)pChild, + (WindowPtr)pChild, + (WindowPtr *)&pLayerWin); } - (*pScreen->MarkWindow) (pWin); + (*pScreen->MarkWindow) ((WindowPtr)pWin); anyMarked = TRUE; if (pWin->valdata) { @@ -3761,27 +3762,27 @@ SetRootClip(ScreenPtr pScreen, Bool enable) { if (pWin->firstChild) { - anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild, - pWin->firstChild, + anyMarked |= (*pScreen->MarkOverlappedWindows)((WindowPtr)pWin->firstChild, + (WindowPtr)pWin->firstChild, (WindowPtr *)NULL); } else { - (*pScreen->MarkWindow) (pWin); + (*pScreen->MarkWindow) ((WindowPtr)pWin); anyMarked = TRUE; } if (anyMarked) - (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); + (*pScreen->ValidateTree)((WindowPtr)pWin, NullWindow, VTOther); } if (WasViewable) { if (anyMarked) - (*pScreen->HandleExposures)(pWin); + (*pScreen->HandleExposures)((WindowPtr)pWin); if (anyMarked && pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); + (*pScreen->PostValidateTree)((WindowPtr)pWin, NullWindow, VTOther); } if (pWin->realized) WindowsRestructured (); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index e664ce451..721893f92 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -275,7 +275,7 @@ xf86CreateRootWindow(WindowPtr pWin) Atom prop; prop = MakeAtom(pProp->name, strlen(pProp->name), TRUE); - err = dixChangeWindowProperty(serverClient, pWin, + err = dixChangeWindowProperty(serverClient, (ProtocolWindowPtr)pWin, prop, pProp->type, pProp->format, PropModeReplace, pProp->size, pProp->data, diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index 53ebe8f88..17c3b55bb 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -654,7 +654,7 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) /* get window clip list */ if(portPriv->subWindowMode == IncludeInferiors) { - pregWin = NotClippedByChildren(pWin); + pregWin = NotClippedByChildren((ProtocolWindowPtr)pWin); freeCompClip = TRUE; } else pregWin = &pWin->clipList; @@ -975,7 +975,7 @@ CLIP_VIDEO_BAILOUT: static int -xf86XVReputAllVideo(WindowPtr pWin, pointer data) +xf86XVReputAllVideo(ProtocolWindowPtr pWin, pointer data) { XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin); @@ -1946,7 +1946,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr fillboxes) void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr fillboxes) { - xf86XVFillKeyHelperDrawable (&pScreen->root->drawable, key, fillboxes); + xf86XVFillKeyHelperDrawable ((DrawablePtr)&pScreen->root->drawable, key, fillboxes); } void diff --git a/include/colormap.h b/include/colormap.h index 1b1574839..8f114487f 100644 --- a/include/colormap.h +++ b/include/colormap.h @@ -89,11 +89,11 @@ extern _X_EXPORT int FreeColormap( XID /*mid*/); extern _X_EXPORT int TellLostMap( - WindowPtr /*pwin*/, + ProtocolWindowPtr /*pwin*/, pointer /* Colormap *pmid */); extern _X_EXPORT int TellGainedMap( - WindowPtr /*pwin*/, + ProtocolWindowPtr /*pwin*/, pointer /* Colormap *pmid */); extern _X_EXPORT int CopyColormapAndFree( @@ -179,7 +179,7 @@ extern _X_EXPORT int StoreColors( extern _X_EXPORT int IsMapInstalled( Colormap /*map*/, - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT Bool ResizeVisualArray( ScreenPtr /* pScreen */, diff --git a/include/cursor.h b/include/cursor.h index 59978d4ca..cbc916c0a 100644 --- a/include/cursor.h +++ b/include/cursor.h @@ -118,7 +118,7 @@ extern _X_EXPORT Bool CursorMetricsFromGlyph( CursorMetricPtr /*cm*/); extern _X_EXPORT void CheckCursorConfinement( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT void NewCurrentScreen( struct _DeviceIntRec* /*pDev*/, diff --git a/include/dix.h b/include/dix.h index c201e3ac1..3d8e952cd 100644 --- a/include/dix.h +++ b/include/dix.h @@ -181,7 +181,7 @@ extern _X_EXPORT int CompareISOLatin1Lowered( int blen); extern _X_EXPORT int dixLookupWindow( - WindowPtr *result, + ProtocolWindowPtr *result, XID id, ClientPtr client, Mask access_mode); @@ -215,13 +215,13 @@ extern _X_EXPORT void NoopDDA(void); extern _X_EXPORT int AlterSaveSetForClient( ClientPtr /*client*/, - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, unsigned /*mode*/, Bool /*toRoot*/, Bool /*map*/); extern _X_EXPORT void DeleteWindowFromAnySaveSet( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT void BlockHandler( pointer /*pTimeout*/, @@ -326,12 +326,12 @@ extern _X_EXPORT void ConfineToShape( int* /* py */); extern _X_EXPORT Bool IsParent( - WindowPtr /* maybeparent */, - WindowPtr /* child */); + ProtocolWindowPtr /* maybeparent */, + ProtocolWindowPtr /* child */); -extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev); +extern _X_EXPORT ProtocolWindowPtr GetCurrentRootWindow(DeviceIntPtr pDev); -extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev); +extern _X_EXPORT ProtocolWindowPtr GetSpriteWindow(DeviceIntPtr pDev); extern _X_EXPORT void NoticeEventTime(InternalEvent *ev); @@ -360,8 +360,8 @@ extern void DeactivateKeyboardGrab( extern BOOL ActivateFocusInGrab( DeviceIntPtr /* dev */, - WindowPtr /* old */, - WindowPtr /* win */); + ProtocolWindowPtr /* old */, + ProtocolWindowPtr /* win */); extern void AllowSome( ClientPtr /* client */, @@ -373,7 +373,7 @@ extern void ReleaseActiveGrabs( ClientPtr client); extern GrabPtr CheckPassiveGrabsOnWindow( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, DeviceIntPtr /* device */, DeviceEvent * /* event */, BOOL /* checkCore */, @@ -381,39 +381,39 @@ extern GrabPtr CheckPassiveGrabsOnWindow( extern _X_EXPORT int DeliverEventsToWindow( DeviceIntPtr /* pWin */, - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, xEventPtr /* pEvents */, int /* count */, Mask /* filter */, GrabPtr /* grab */); extern int DeliverDeviceEvents( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, InternalEvent* /* event */, GrabPtr /* grab */, - WindowPtr /* stopAt */, + ProtocolWindowPtr /* stopAt */, DeviceIntPtr /* dev */); extern void InitializeSprite( DeviceIntPtr /* pDev */, - WindowPtr /* pWin */); + ProtocolWindowPtr /* pWin */); extern void UpdateSpriteForScreen( DeviceIntPtr /* pDev */, ScreenPtr /* pScreen */); extern _X_EXPORT void WindowHasNewCursor( - WindowPtr /* pWin */); + ProtocolWindowPtr /* pWin */); extern Bool CheckDeviceGrabs( DeviceIntPtr /* device */, DeviceEvent* /* event */, - WindowPtr /* ancestor */); + ProtocolWindowPtr /* ancestor */); extern void DeliverFocusedEvent( DeviceIntPtr /* keybd */, InternalEvent* /* event */, - WindowPtr /* window */); + ProtocolWindowPtr /* window */); extern void DeliverGrabbedEvent( InternalEvent* /* event */, @@ -425,7 +425,7 @@ extern void FixKeyState( DeviceIntPtr /* keybd */); extern void RecalculateDeliverableEvents( - WindowPtr /* pWin */); + ProtocolWindowPtr /* pWin */); extern _X_EXPORT int OtherClientGone( pointer /* value */, @@ -433,8 +433,8 @@ extern _X_EXPORT int OtherClientGone( extern void DoFocusEvents( DeviceIntPtr /* dev */, - WindowPtr /* fromWin */, - WindowPtr /* toWin */, + ProtocolWindowPtr /* fromWin */, + ProtocolWindowPtr /* toWin */, int /* mode */); extern int SetInputFocus( @@ -464,21 +464,21 @@ extern void InitEvents(void); extern void CloseDownEvents(void); extern void DeleteWindowFromAnyEvents( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, Bool /* freeResources */); extern Mask EventMaskForClient( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* client */); extern _X_EXPORT int DeliverEvents( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, xEventPtr /*xE*/, int /*count*/, - WindowPtr /*otherParent*/); + ProtocolWindowPtr /*otherParent*/); extern Bool CheckMotion( DeviceEvent* /* ev */, @@ -516,7 +516,7 @@ extern Bool IsInterferingGrab( xEvent* /* events */); #ifdef PANORAMIX -extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); +extern _X_EXPORT void ReinitializeRootWindow(ProtocolWindowPtr win, int xoff, int yoff); #endif #ifdef RANDR diff --git a/include/dixevents.h b/include/dixevents.h index b9153456f..998c0e932 100644 --- a/include/dixevents.h +++ b/include/dixevents.h @@ -33,7 +33,7 @@ extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/); extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */); extern _X_EXPORT int MaybeDeliverEventsToClient( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, xEvent * /* pEvents */, int /* count */, Mask /* filter */, @@ -42,12 +42,12 @@ extern _X_EXPORT int MaybeDeliverEventsToClient( extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */); extern _X_EXPORT int EventSelectForWindow( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */); extern _X_EXPORT int EventSuppressForWindow( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, Bool * /* checkOptional */); diff --git a/include/dixgrabs.h b/include/dixgrabs.h index 3b2a46d72..6b38ef290 100644 --- a/include/dixgrabs.h +++ b/include/dixgrabs.h @@ -32,13 +32,13 @@ extern GrabPtr CreateGrab( int /* client */, DeviceIntPtr /* device */, DeviceIntPtr /* modDevice */, - WindowPtr /* window */, + ProtocolWindowPtr /* window */, GrabType /* grabtype */, GrabMask * /* mask */, struct _GrabParameters * /* param */, int /* type */, KeyCode /* keybut */, - WindowPtr /* confineTo */, + ProtocolWindowPtr /* confineTo */, CursorPtr /* cursor */); extern _X_EXPORT int DeletePassiveGrab( diff --git a/include/dixstruct.h b/include/dixstruct.h index 443e8b0ae..540d01e52 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -66,7 +66,7 @@ typedef enum {ClientStateInitial, #ifdef XFIXES typedef struct _saveSet { - struct _Window *windowPtr; + struct _ProtocolWindow *windowPtr; Bool toRoot; Bool map; } SaveSetElt; diff --git a/include/exevents.h b/include/exevents.h index 2b226986b..0755d6c98 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -163,7 +163,7 @@ DeviceFocusEvent( int /* type */, int /* mode */, int /* detail */, - WindowPtr /* pWin */); + ProtocolWindowPtr /* pWin */); extern int CheckGrabValues( @@ -201,25 +201,25 @@ GrabWindow( extern int SelectForWindow( DeviceIntPtr /* dev */, - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, Mask /* exclusivemasks */); extern int AddExtensionClient ( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, int /* mskidx */); extern void RecalculateDeviceDeliverableEvents( - WindowPtr /* pWin */); + ProtocolWindowPtr /* pWin */); extern int InputClientGone( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, XID /* id */); extern int @@ -252,7 +252,7 @@ ChangeKeyMapping( extern void DeleteWindowFromAnyExtEvents( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, Bool /* freeResources */); extern int @@ -262,7 +262,7 @@ MaybeSendDeviceMotionNotifyHint ( extern void CheckDeviceGrabAndHintWindow ( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, int /* type */, deviceKeyButtonPointer * /* xE */, GrabPtr /* grab */, @@ -276,7 +276,7 @@ MaybeStopDeviceHint( extern int DeviceEventSuppressForWindow( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, int /* maskndx */); @@ -303,7 +303,7 @@ XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChangedEvent *dce); extern int -XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, +XISetEventMask(DeviceIntPtr dev, ProtocolWindowPtr win, ClientPtr client, unsigned int len, unsigned char* mask); extern int diff --git a/include/input.h b/include/input.h index bdef0389e..c48617f7d 100644 --- a/include/input.h +++ b/include/input.h @@ -84,15 +84,15 @@ SOFTWARE. #define MAP_LENGTH 256 #define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */ #define NullGrab ((GrabPtr)NULL) -#define PointerRootWin ((WindowPtr)PointerRoot) -#define NoneWin ((WindowPtr)None) +#define PointerRootWin ((ProtocolWindowPtr)PointerRoot) +#define NoneWin ((ProtocolWindowPtr)None) #define NullDevice ((DevicePtr)NULL) #ifndef FollowKeyboard #define FollowKeyboard 3 #endif #ifndef FollowKeyboardWin -#define FollowKeyboardWin ((WindowPtr) FollowKeyboard) +#define FollowKeyboardWin ((ProtocolWindowPtr) FollowKeyboard) #endif #ifndef RevertToFollowKeyboard #define RevertToFollowKeyboard 3 @@ -531,15 +531,15 @@ extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs); /* misc event helpers */ extern Mask GetEventMask(DeviceIntPtr dev, xEvent* ev, InputClientsPtr clients); extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); -extern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev); +extern Mask GetWindowXI2Mask(DeviceIntPtr dev, ProtocolWindowPtr win, xEvent* ev); void FixUpEventFromWindow(SpritePtr pSprite, xEvent *xE, - WindowPtr pWin, + ProtocolWindowPtr pWin, Window child, Bool calcChild); -extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y); +extern ProtocolWindowPtr XYToWindow(SpritePtr pSprite, int x, int y); extern int EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, - WindowPtr win); + ProtocolWindowPtr win); /** * Masks specifying the type of event to deliver for an InternalEvent; used * by EventIsDeliverable. diff --git a/include/inputstr.h b/include/inputstr.h index 8509eb024..7ddeec215 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -186,7 +186,7 @@ typedef struct _GrabRec { GrabPtr next; /* for chain of passive grabs */ XID resource; DeviceIntPtr device; - WindowPtr window; + ProtocolWindowPtr window; unsigned ownerEvents:1; unsigned keyboardMode:1; unsigned pointerMode:1; @@ -195,7 +195,7 @@ typedef struct _GrabRec { DetailRec modifiersDetail; DeviceIntPtr modifierDevice; DetailRec detail; /* key or button */ - WindowPtr confineTo; /* always NULL for keyboards */ + ProtocolWindowPtr confineTo; /* always NULL for keyboards */ CursorPtr cursor; /* always NULL for keyboards */ Mask eventMask; Mask deviceMask; @@ -212,22 +212,22 @@ typedef struct _SpriteRec { Bool confined; /* confined to screen */ RegionPtr hotShape; /* additional logical shape constraint */ BoxRec physLimits; /* physical constraints of hot spot */ - WindowPtr win; /* window of logical position */ + ProtocolWindowPtr win; /* window of logical position */ HotSpot hot; /* logical pointer position */ HotSpot hotPhys; /* physical pointer position */ #ifdef PANORAMIX ScreenPtr screen; /* all others are in Screen 0 coordinates */ RegionRec Reg1; /* Region 1 for confining motion */ RegionRec Reg2; /* Region 2 for confining virtual motion */ - WindowPtr windows[MAXSCREENS]; - WindowPtr confineWin; /* confine window */ + ProtocolWindowPtr windows[MAXSCREENS]; + ProtocolWindowPtr confineWin; /* confine window */ #endif /* The window trace information is used at dix/events.c to avoid having * to compute all the windows between the root and the current pointer * window each time a button or key goes down. The grabs on each of those * windows must be checked. * spriteTraces should only be used at dix/events.c! */ - WindowPtr *spriteTrace; + ProtocolWindowPtr *spriteTrace; int spriteTraceSize; int spriteTraceGood; @@ -277,7 +277,7 @@ typedef struct _ValuatorClassRec { int last_motion; void *motion; /* motion history buffer. Different layout for MDs and SDs!*/ - WindowPtr motionHintWindow; + ProtocolWindowPtr motionHintWindow; AxisInfoPtr axes; unsigned short numAxes; @@ -304,10 +304,10 @@ typedef struct _ButtonClassRec { typedef struct _FocusClassRec { int sourceid; - WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */ + ProtocolWindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */ int revert; TimeStamp time; - WindowPtr *trace; + ProtocolWindowPtr *trace; int traceSize; int traceGood; } FocusClassRec, *FocusClassPtr; @@ -602,7 +602,7 @@ typedef struct _EventSyncInfo { * This window may be set to the grab's window (but only when * Replay{Pointer|Keyboard} is given in the XAllowEvents() * request. */ - WindowPtr replayWin; /* ComputeFreezes */ + ProtocolWindowPtr replayWin; /* ComputeFreezes */ /** * Flag to indicate whether we're in the process of * replaying events. Only set in ComputeFreezes(). */ diff --git a/include/property.h b/include/property.h index 075eb4a0d..35cbd0a49 100644 --- a/include/property.h +++ b/include/property.h @@ -54,14 +54,14 @@ typedef struct _Property *PropertyPtr; extern _X_EXPORT int dixLookupProperty( PropertyPtr * /*result*/, - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Atom /*proprty*/, ClientPtr /*pClient*/, Mask /*access_mode*/); extern _X_EXPORT int dixChangeWindowProperty( ClientPtr /*pClient*/, - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Atom /*property*/, Atom /*type*/, int /*format*/, @@ -71,7 +71,7 @@ extern _X_EXPORT int dixChangeWindowProperty( Bool /*sendevent*/); extern _X_EXPORT int ChangeWindowProperty( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Atom /*property*/, Atom /*type*/, int /*format*/, @@ -82,10 +82,10 @@ extern _X_EXPORT int ChangeWindowProperty( extern _X_EXPORT int DeleteProperty( ClientPtr /*client*/, - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Atom /*propName*/); extern _X_EXPORT void DeleteAllWindowProperties( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); #endif /* PROPERTY_H */ diff --git a/include/scrnintstr.h b/include/scrnintstr.h index f34f2f768..83afa835a 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -82,11 +82,11 @@ typedef struct _Depth { } DepthRec; typedef struct _ScreenSaverStuff { - WindowPtr pWindow; + ProtocolWindowPtr pWindow; XID wid; char blanked; Bool (*ExternalScreenSaver)( - ScreenPtr /*pScreen*/, + ProtocolScreenPtr /*pScreen*/, int /*xstate*/, Bool /*force*/); } ScreenSaverStuffRec; @@ -431,7 +431,7 @@ typedef struct _Screen { pointer devPrivate; short numVisuals; VisualPtr visuals; - WindowPtr root; + ProtocolWindowPtr root; ScreenSaverStuffRec screensaver; /* Random screen procedures */ diff --git a/include/selection.h b/include/selection.h index 3271f6abb..ea156508f 100644 --- a/include/selection.h +++ b/include/selection.h @@ -59,7 +59,7 @@ typedef struct _Selection { Atom selection; TimeStamp lastTimeChanged; Window window; - WindowPtr pWin; + ProtocolWindowPtr pWin; ClientPtr client; struct _Selection *next; PrivateRec *devPrivates; @@ -96,7 +96,7 @@ typedef struct { extern _X_EXPORT void InitSelections(void); -extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin); +extern _X_EXPORT void DeleteWindowFromAnySelections(ProtocolWindowPtr pWin); extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client); diff --git a/include/window.h b/include/window.h index 1ea0fd5d3..45338b8c3 100644 --- a/include/window.h +++ b/include/window.h @@ -65,6 +65,7 @@ SOFTWARE. #define WT_DONTWALKCHILDREN 2 #define WT_NOMATCH 3 #define NullWindow ((WindowPtr) 0) +#define NullProtocolWindow ((ProtocolWindowPtr) 0) /* Forward declaration, we can't include input.h here */ struct _DeviceIntRec; @@ -76,11 +77,11 @@ typedef struct _Window *WindowPtr; typedef struct _ProtocolWindow *ProtocolWindowPtr; typedef int (*VisitWindowProcPtr)( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, pointer /*data*/); extern _X_EXPORT int TraverseTree( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, VisitWindowProcPtr /*func*/, pointer /*data*/); @@ -93,18 +94,18 @@ extern _X_EXPORT Bool CreateRootWindow( ScreenPtr /*pScreen*/); extern _X_EXPORT void InitRootWindow( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); -typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin); +typedef ProtocolWindowPtr (* RealChildHeadProc) (ProtocolWindowPtr pWin); extern _X_EXPORT void RegisterRealChildHeadProc (RealChildHeadProc proc); -extern _X_EXPORT WindowPtr RealChildHead( - WindowPtr /*pWin*/); +extern _X_EXPORT ProtocolWindowPtr RealChildHead( + ProtocolWindowPtr /*pWin*/); -extern _X_EXPORT WindowPtr CreateWindow( +extern _X_EXPORT ProtocolWindowPtr CreateWindow( Window /*wid*/, - WindowPtr /*pParent*/, + ProtocolWindowPtr /*pParent*/, int /*x*/, int /*y*/, unsigned int /*w*/, @@ -123,7 +124,7 @@ extern _X_EXPORT int DeleteWindow( XID /*wid*/); extern _X_EXPORT int DestroySubwindows( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, ClientPtr /*client*/); /* Quartz support on Mac OS X uses the HIToolbox @@ -132,18 +133,18 @@ extern _X_EXPORT int DestroySubwindows( #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes #endif extern _X_EXPORT int ChangeWindowAttributes( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Mask /*vmask*/, XID* /*vlist*/, ClientPtr /*client*/); extern _X_EXPORT int ChangeWindowDeviceCursor( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, struct _DeviceIntRec* /*pDev*/, struct _Cursor* /*pCursor*/); extern _X_EXPORT struct _Cursor* WindowGetDeviceCursor( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, struct _DeviceIntRec* /*pDev*/); /* Quartz support on Mac OS X uses the HIToolbox @@ -154,7 +155,7 @@ extern void Darwin_X_GetWindowAttributes( #else extern _X_EXPORT void GetWindowAttributes( #endif - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, ClientPtr /*client*/, xGetWindowAttributesReply* /* wa */); @@ -170,51 +171,51 @@ extern _X_EXPORT void GravityTranslate( int* /*desty*/); extern _X_EXPORT int ConfigureWindow( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Mask /*mask*/, XID* /*vlist*/, ClientPtr /*client*/); extern _X_EXPORT int CirculateWindow( - WindowPtr /*pParent*/, + ProtocolWindowPtr /*pParent*/, int /*direction*/, ClientPtr /*client*/); extern _X_EXPORT int ReparentWindow( - WindowPtr /*pWin*/, - WindowPtr /*pParent*/, + ProtocolWindowPtr /*pWin*/, + ProtocolWindowPtr /*pParent*/, int /*x*/, int /*y*/, ClientPtr /*client*/); extern _X_EXPORT int MapWindow( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, ClientPtr /*client*/); extern _X_EXPORT void MapSubwindows( - WindowPtr /*pParent*/, + ProtocolWindowPtr /*pParent*/, ClientPtr /*client*/); extern _X_EXPORT int UnmapWindow( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, Bool /*fromConfigure*/); extern _X_EXPORT void UnmapSubwindows( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT void HandleSaveSet( ClientPtr /*client*/); extern _X_EXPORT Bool PointInWindowIsVisible( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, int /*x*/, int /*y*/); extern _X_EXPORT RegionPtr NotClippedByChildren( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT void SendVisibilityNotify( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT int dixSaveScreens( ClientPtr client, @@ -225,27 +226,27 @@ extern _X_EXPORT int SaveScreens( int on, int mode); -extern _X_EXPORT WindowPtr FindWindowWithOptional( - WindowPtr /*w*/); +extern _X_EXPORT ProtocolWindowPtr FindWindowWithOptional( + ProtocolWindowPtr /*w*/); extern _X_EXPORT void CheckWindowOptionalNeed( - WindowPtr /*w*/); + ProtocolWindowPtr /*w*/); extern _X_EXPORT Bool MakeWindowOptional( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); -extern _X_EXPORT WindowPtr MoveWindowInStack( - WindowPtr /*pWin*/, - WindowPtr /*pNextSib*/); +extern _X_EXPORT ProtocolWindowPtr MoveWindowInStack( + ProtocolWindowPtr /*pWin*/, + ProtocolWindowPtr /*pNextSib*/); extern _X_EXPORT void SetWinSize( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT void SetBorderSize( - WindowPtr /*pWin*/); + ProtocolWindowPtr /*pWin*/); extern _X_EXPORT void ResizeChildrenWinSize( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, int /*dx*/, int /*dy*/, int /*dw*/, @@ -254,19 +255,19 @@ extern _X_EXPORT void ResizeChildrenWinSize( extern _X_EXPORT void ShapeExtensionInit(void); extern _X_EXPORT void SendShapeNotify( - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, int /* which */ ); extern _X_EXPORT RegionPtr CreateBoundingShape( - WindowPtr /* pWin */ ); + ProtocolWindowPtr /* pWin */ ); extern _X_EXPORT RegionPtr CreateClipShape( - WindowPtr /* pWin */ ); + ProtocolWindowPtr /* pWin */ ); extern _X_EXPORT void DisableMapUnmapEvents( - WindowPtr /* pWin */ ); + ProtocolWindowPtr /* pWin */ ); extern _X_EXPORT void EnableMapUnmapEvents( - WindowPtr /* pWin */ ); + ProtocolWindowPtr /* pWin */ ); extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, Bool enable); #endif /* WINDOW_H */ diff --git a/include/windowstr.h b/include/windowstr.h index ac65c7b6a..168df8749 100644 --- a/include/windowstr.h +++ b/include/windowstr.h @@ -260,7 +260,7 @@ typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr; #define SCREEN_IS_TILED 2 #define SCREEN_IS_BLACK 3 -#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow) +#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullProtocolWindow) extern _X_EXPORT int screenIsSaved; diff --git a/include/xkbsrv.h b/include/xkbsrv.h index c6f86f544..48d500981 100644 --- a/include/xkbsrv.h +++ b/include/xkbsrv.h @@ -660,7 +660,7 @@ extern _X_EXPORT void XkbHandleBell( pointer /* ctrl */, CARD8 /* class */, Atom /* name */, - WindowPtr /* pWin */, + ProtocolWindowPtr /* pWin */, ClientPtr /* pClient */ ); @@ -257,20 +257,20 @@ extern _X_EXPORT void miSendGraphicsExpose( ); extern _X_EXPORT void miSendExposures( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, RegionPtr /*pRgn*/, int /*dx*/, int /*dy*/ ); extern _X_EXPORT void miWindowExposures( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, RegionPtr /*prgn*/, RegionPtr /*other_exposed*/ ); extern _X_EXPORT void miPaintWindow( - WindowPtr /*pWin*/, + ProtocolWindowPtr /*pWin*/, RegionPtr /*prgn*/, int /*what*/ ); diff --git a/mi/midispcur.c b/mi/midispcur.c index 9b3e87a57..dbb82c7a3 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -148,7 +148,7 @@ miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) #define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win)) static VisualPtr -miDCGetWindowVisual (WindowPtr pWin) +miDCGetWindowVisual (ProtocolWindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; VisualID vid = wVisual (pWin); @@ -161,7 +161,7 @@ miDCGetWindowVisual (WindowPtr pWin) } static PicturePtr -miDCMakePicture (PicturePtr *ppPicture, DrawablePtr pDraw, WindowPtr pWin) +miDCMakePicture (PicturePtr *ppPicture, DrawablePtr pDraw, ProtocolWindowPtr pWin) { ScreenPtr pScreen = pDraw->pScreen; VisualPtr pVisual; @@ -378,7 +378,7 @@ miDCPutBits ( } static GCPtr -miDCMakeGC(WindowPtr pWin) +miDCMakeGC(ProtocolWindowPtr pWin) { GCPtr pGC; int status; @@ -400,7 +400,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, miDCScreenPtr pScreenPriv; miDCCursorPtr pPriv; miDCBufferPtr pBuffer; - WindowPtr pWin; + ProtocolWindowPtr pWin; pPriv = (miDCCursorPtr)dixLookupScreenPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey, pScreen); @@ -447,7 +447,7 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; PixmapPtr pSave; - WindowPtr pWin; + ProtocolWindowPtr pWin; GCPtr pGC; pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, @@ -481,7 +481,7 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, miDCScreenPtr pScreenPriv; miDCBufferPtr pBuffer; PixmapPtr pSave; - WindowPtr pWin; + ProtocolWindowPtr pWin; GCPtr pGC; pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, @@ -505,7 +505,7 @@ Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; - WindowPtr pWin; + ProtocolWindowPtr pWin; int i; if (!DevHasCursor(pDev)) diff --git a/mi/miexpose.c b/mi/miexpose.c index 94258b864..a69920699 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -143,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, and then screen relative to paint the window background */ - WindowPtr pSrcWin; + ProtocolWindowPtr pSrcWin; BoxRec expBox; Bool extents; @@ -151,7 +151,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (!pGC->graphicsExposures && (pDstDrawable->type == DRAWABLE_PIXMAP) && ((pSrcDrawable->type == DRAWABLE_PIXMAP) || - (((WindowPtr)pSrcDrawable)->backStorage == NULL))) + (((ProtocolWindowPtr)pSrcDrawable)->backStorage == NULL))) return NULL; srcBox.x1 = srcx; @@ -167,7 +167,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, TsrcBox.y1 = srcy + pSrcDrawable->y; TsrcBox.x2 = TsrcBox.x1 + width; TsrcBox.y2 = TsrcBox.y1 + height; - pSrcWin = (WindowPtr) pSrcDrawable; + pSrcWin = (ProtocolWindowPtr) pSrcDrawable; if (pGC->subWindowMode == IncludeInferiors) { prgnSrcClip = NotClippedByChildren (pSrcWin); @@ -214,14 +214,14 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, { if (pGC->subWindowMode == IncludeInferiors) { - prgnDstClip = NotClippedByChildren((WindowPtr)pDstDrawable); + prgnDstClip = NotClippedByChildren((ProtocolWindowPtr)pDstDrawable); } else { prgnDstClip = &rgnDstRec; RegionNull(prgnDstClip); RegionCopy(prgnDstClip, - &((WindowPtr)pDstDrawable)->clipList); + &((ProtocolWindowPtr)pDstDrawable)->clipList); } RegionTranslate(prgnDstClip, -pDstDrawable->x, -pDstDrawable->y); @@ -283,9 +283,9 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, RegionReset(&rgnExposed, &expBox); } if ((pDstDrawable->type != DRAWABLE_PIXMAP) && - (((WindowPtr)pDstDrawable)->backgroundState != None)) + (((ProtocolWindowPtr)pDstDrawable)->backgroundState != None)) { - WindowPtr pWin = (WindowPtr)pDstDrawable; + ProtocolWindowPtr pWin = (ProtocolWindowPtr)pDstDrawable; /* make the exposed area screen-relative */ RegionTranslate(&rgnExposed, @@ -296,7 +296,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, /* miPaintWindow doesn't clip, so we have to */ RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList); } - miPaintWindow((WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND); + miPaintWindow((ProtocolWindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND); if (extents) { @@ -390,7 +390,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, void -miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) +miSendExposures( ProtocolWindowPtr pWin, RegionPtr pRgn, int dx, int dy) { BoxPtr pBox; int numRects; @@ -450,7 +450,7 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) } void -miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) +miWindowExposures( ProtocolWindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { RegionPtr exposures = prgn; if ((prgn && !RegionNil(prgn)) || @@ -517,14 +517,14 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) #ifdef ROOTLESS /* Ugly, ugly, but we lost our hooks into miPaintWindow... =/ */ -void RootlessSetPixmapOfAncestors(WindowPtr pWin); -void RootlessStartDrawing(WindowPtr pWin); -void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn); -Bool IsFramedWindow(WindowPtr pWin); +void RootlessSetPixmapOfAncestors(ProtocolWindowPtr pWin); +void RootlessStartDrawing(ProtocolWindowPtr pWin); +void RootlessDamageRegion(ProtocolWindowPtr pWin, RegionPtr prgn); +Bool IsFramedWindow(ProtocolWindowPtr pWin); #endif void -miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) +miPaintWindow(ProtocolWindowPtr pWin, RegionPtr prgn, int what) { ScreenPtr pScreen = pWin->drawable.pScreen; ChangeGCVal gcval[6]; diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 766c5e7f7..082c04ecb 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -309,7 +309,7 @@ miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) { if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) { /* This could probably be more optimal */ - RebuildTree(pWin->drawable.pScreen->root->firstChild); + RebuildTree((WindowPtr)pWin->drawable.pScreen->root->firstChild); } } diff --git a/miext/damage/damage.c b/miext/damage/damage.c index 0fe1fb603..df624d2b4 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -91,7 +91,7 @@ getDrawableDamageRef (DrawablePtr pDrawable) pPixmap = 0; if (pScreen->GetWindowPixmap #ifdef ROOTLESS_WORKAROUND - && ((WindowPtr)pDrawable)->viewable + && ((ProtocolWindowPtr)pDrawable)->viewable #endif ) pPixmap = (*pScreen->GetWindowPixmap) ((WindowPtr)pDrawable); @@ -252,17 +252,17 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, #endif if (pDrawable->type == DRAWABLE_WINDOW && - ((WindowPtr)(pDrawable))->backingStore == NotUseful) + ((ProtocolWindowPtr)(pDrawable))->backingStore == NotUseful) { if (subWindowMode == ClipByChildren) { RegionIntersect(pRegion, pRegion, - &((WindowPtr)(pDrawable))->clipList); + &((ProtocolWindowPtr)(pDrawable))->clipList); } else if (subWindowMode == IncludeInferiors) { RegionPtr pTempRegion = - NotClippedByChildren((WindowPtr)(pDrawable)); + NotClippedByChildren((ProtocolWindowPtr)(pDrawable)); RegionIntersect(pRegion, pRegion, pTempRegion); RegionDestroy(pTempRegion); } @@ -288,7 +288,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * Check for unrealized windows */ if (pDamage->pDrawable->type == DRAWABLE_WINDOW && - !((WindowPtr) (pDamage->pDrawable))->realized) + !((ProtocolWindowPtr) (pDamage->pDrawable))->realized) { continue; } @@ -317,7 +317,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, pDamageRegion = &clippedRec; if (pDamage->pDrawable->type == DRAWABLE_WINDOW) { RegionIntersect(pDamageRegion, pRegion, - &((WindowPtr)(pDamage->pDrawable))->borderClip); + &((ProtocolWindowPtr)(pDamage->pDrawable))->borderClip); } else { BoxRec box; box.x1 = draw_x; diff --git a/miext/rootless/rootless.h b/miext/rootless/rootless.h index 3d4a1b077..04d03c442 100644 --- a/miext/rootless/rootless.h +++ b/miext/rootless/rootless.h @@ -60,7 +60,7 @@ typedef struct _RootlessWindowRec { int level; RootlessFrameID wid; // implementation specific frame id - WindowPtr win; // underlying X window + ProtocolWindowPtr win; // underlying X window // Valid only when drawing (ie. is_drawing is set) char *pixelData; @@ -328,26 +328,26 @@ Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs); * * create If true and the window has no frame, attempt to create one */ -RootlessFrameID RootlessFrameForWindow(WindowPtr pWin, Bool create); +RootlessFrameID RootlessFrameForWindow(ProtocolWindowPtr pWin, Bool create); /* * Return the top-level parent of a window. * The root is the top-level parent of itself, even though the root is * not otherwise considered to be a top-level window. */ -WindowPtr TopLevelParent(WindowPtr pWindow); +ProtocolWindowPtr TopLevelParent(ProtocolWindowPtr pWindow); /* * Prepare a window for direct access to its backing buffer. */ -void RootlessStartDrawing(WindowPtr pWindow); +void RootlessStartDrawing(ProtocolWindowPtr pWindow); /* * Finish drawing to a window's backing buffer. * * flush If true, damaged areas are flushed to the screen. */ -void RootlessStopDrawing(WindowPtr pWindow, Bool flush); +void RootlessStopDrawing(ProtocolWindowPtr pWindow, Bool flush); /* * Alocate a new screen pixmap. diff --git a/miext/rootless/rootlessCommon.c b/miext/rootless/rootlessCommon.c index 861e8e858..a2dead09f 100644 --- a/miext/rootless/rootlessCommon.c +++ b/miext/rootless/rootlessCommon.c @@ -62,10 +62,10 @@ RegionRec rootlessHugeRoot = {{-32767, -32767, 32767, 32767}, NULL}; * The root is the top-level parent of itself, even though the root is * not otherwise considered to be a top-level window. */ -WindowPtr -TopLevelParent(WindowPtr pWindow) +ProtocolWindowPtr +TopLevelParent(ProtocolWindowPtr pWindow) { - WindowPtr top; + ProtocolWindowPtr top; if (IsRoot(pWindow)) return pWindow; @@ -84,9 +84,9 @@ TopLevelParent(WindowPtr pWindow) * (e.g. it is visible and has a top-level or root parent) */ Bool -IsFramedWindow(WindowPtr pWin) +IsFramedWindow(ProtocolWindowPtr pWin) { - WindowPtr top; + ProtocolWindowPtr top; if (!dixPrivateKeyRegistered(&rootlessWindowPrivateKeyRec)) return FALSE; @@ -140,10 +140,10 @@ RootlessResolveColormap (ScreenPtr pScreen, int first_color, * Each top-level parent has a Pixmap representing its backing buffer, * which all of its children inherit. */ -void RootlessStartDrawing(WindowPtr pWindow) +void RootlessStartDrawing(ProtocolWindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; - WindowPtr top = TopLevelParent(pWindow); + ProtocolWindowPtr top = TopLevelParent(pWindow); RootlessWindowRec *winRec; PixmapPtr curPixmap; @@ -172,7 +172,7 @@ void RootlessStartDrawing(WindowPtr pWindow) winRec->is_drawing = TRUE; } - curPixmap = pScreen->GetWindowPixmap(pWindow); + curPixmap = pScreen->GetWindowPixmap((WindowPtr)pWindow); if (curPixmap == winRec->pixmap) { RL_DEBUG_MSG("Window %p already has winRec->pixmap %p; not pushing\n", pWindow, winRec->pixmap); @@ -188,7 +188,7 @@ void RootlessStartDrawing(WindowPtr pWindow) RL_DEBUG_MSG("Window %p's existing oldPixmap %p being lost!\n", pWindow, oldPixmap); } dixSetPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey, curPixmap); - pScreen->SetWindowPixmap(pWindow, winRec->pixmap); + pScreen->SetWindowPixmap((WindowPtr)pWindow, winRec->pixmap); } } @@ -198,11 +198,11 @@ void RootlessStartDrawing(WindowPtr pWindow) * Stop drawing to a window's backing buffer. If flush is true, * damaged regions are flushed to the screen. */ -static int RestorePreDrawingPixmapVisitor(WindowPtr pWindow, pointer data) +static int RestorePreDrawingPixmapVisitor(ProtocolWindowPtr pWindow, pointer data) { RootlessWindowRec *winRec = (RootlessWindowRec*)data; ScreenPtr pScreen = pWindow->drawable.pScreen; - PixmapPtr exPixmap = pScreen->GetWindowPixmap(pWindow); + PixmapPtr exPixmap = pScreen->GetWindowPixmap((WindowPtr)pWindow); PixmapPtr oldPixmap = dixLookupPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey); if (oldPixmap == NULL) { @@ -215,16 +215,16 @@ static int RestorePreDrawingPixmapVisitor(WindowPtr pWindow, pointer data) RL_DEBUG_MSG("Window %p appears to be in drawing mode (oldPixmap %p) but ex-pixmap %p not winRec->pixmap %p!\n", pWindow, oldPixmap, exPixmap, winRec->pixmap); if (oldPixmap == winRec->pixmap) RL_DEBUG_MSG("Window %p's oldPixmap %p is winRec->pixmap, which has just been freed!\n", pWindow, oldPixmap); - pScreen->SetWindowPixmap(pWindow, oldPixmap); + pScreen->SetWindowPixmap((WindowPtr)pWindow, oldPixmap); dixSetPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey, NULL); } return WT_WALKCHILDREN; } -void RootlessStopDrawing(WindowPtr pWindow, Bool flush) +void RootlessStopDrawing(ProtocolWindowPtr pWindow, Bool flush) { ScreenPtr pScreen = pWindow->drawable.pScreen; - WindowPtr top = TopLevelParent(pWindow); + ProtocolWindowPtr top = TopLevelParent(pWindow); RootlessWindowRec *winRec; if (top == NULL) @@ -259,11 +259,11 @@ void RootlessStopDrawing(WindowPtr pWindow, Bool flush) * pRegion is in GLOBAL coordinates. */ void -RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) +RootlessDamageRegion(ProtocolWindowPtr pWindow, RegionPtr pRegion) { RootlessWindowRec *winRec; RegionRec clipped; - WindowPtr pTop; + ProtocolWindowPtr pTop; BoxPtr b1, b2; RL_DEBUG_MSG("Damaged win 0x%x ", pWindow); @@ -355,7 +355,7 @@ out: * pRegion is in GLOBAL coordinates. */ void -RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) +RootlessDamageBox(ProtocolWindowPtr pWindow, BoxPtr pBox) { RegionRec region; @@ -373,7 +373,7 @@ RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) * (x, y, w, h) is in window-local coordinates. */ void -RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) +RootlessDamageRect(ProtocolWindowPtr pWindow, int x, int y, int w, int h) { BoxRec box; RegionRec region; @@ -399,7 +399,7 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) * Stop drawing and redisplay the damaged region of a window. */ void -RootlessRedisplay(WindowPtr pWindow) +RootlessRedisplay(ProtocolWindowPtr pWindow) { RootlessStopDrawing(pWindow, TRUE); } @@ -412,8 +412,8 @@ RootlessRedisplay(WindowPtr pWindow) void RootlessRepositionWindows(ScreenPtr pScreen) { - WindowPtr root = pScreen->root; - WindowPtr win; + ProtocolWindowPtr root = pScreen->root; + ProtocolWindowPtr win; if (root != NULL) { RootlessRepositionWindow(root); @@ -433,10 +433,10 @@ RootlessRepositionWindows(ScreenPtr pScreen) void RootlessRedisplayScreen(ScreenPtr pScreen) { - WindowPtr root = pScreen->root; + ProtocolWindowPtr root = pScreen->root; if (root != NULL) { - WindowPtr win; + ProtocolWindowPtr win; RootlessRedisplay(root); for (win = root->firstChild; win; win = win->nextSib) { diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 6faf1febd..45fdb33c0 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -197,7 +197,7 @@ extern RegionRec rootlessHugeRoot; #define HUGE_ROOT(pWin) \ do { \ - WindowPtr w = pWin; \ + ProtocolWindowPtr w = pWin; \ while (w->parent) \ w = w->parent; \ saveRoot = w->winSize; \ @@ -206,7 +206,7 @@ extern RegionRec rootlessHugeRoot; #define NORMAL_ROOT(pWin) \ do { \ - WindowPtr w = pWin; \ + ProtocolWindowPtr w = pWin; \ while (w->parent) \ w = w->parent; \ w->winSize = saveRoot; \ @@ -248,15 +248,15 @@ extern RegionRec rootlessHugeRoot; // Returns TRUE if this window is visible inside a frame // (e.g. it is visible and has a top-level or root parent) -Bool IsFramedWindow(WindowPtr pWin); +Bool IsFramedWindow(ProtocolWindowPtr pWin); // Routines that cause regions to get redrawn. // DamageRegion and DamageRect are in global coordinates. // DamageBox is in window-local coordinates. -void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion); -void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h); -void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox); -void RootlessRedisplay(WindowPtr pWindow); +void RootlessDamageRegion(ProtocolWindowPtr pWindow, RegionPtr pRegion); +void RootlessDamageRect(ProtocolWindowPtr pWindow, int x, int y, int w, int h); +void RootlessDamageBox(ProtocolWindowPtr pWindow, BoxPtr pBox); +void RootlessRedisplay(ProtocolWindowPtr pWindow); void RootlessRedisplayScreen(ScreenPtr pScreen); void RootlessQueueRedisplay(ScreenPtr pScreen); @@ -268,14 +268,14 @@ ColormapPtr RootlessGetColormap (ScreenPtr pScreen); Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color, int n_colors, uint32_t *colors); -void RootlessFlushWindowColormap (WindowPtr pWin); +void RootlessFlushWindowColormap (ProtocolWindowPtr pWin); void RootlessFlushScreenColormaps (ScreenPtr pScreen); // Move a window to its proper location on the screen. -void RootlessRepositionWindow(WindowPtr pWin); +void RootlessRepositionWindow(ProtocolWindowPtr pWin); // Move the window to it's correct place in the physical stacking order. -void RootlessReorderWindow(WindowPtr pWin); +void RootlessReorderWindow(ProtocolWindowPtr pWin); void RootlessScreenExpose (ScreenPtr pScreen); void RootlessHideAllWindows (void); @@ -285,6 +285,6 @@ void RootlessUpdateRooted (Bool state); void RootlessEnableRoot (ScreenPtr pScreen); void RootlessDisableRoot (ScreenPtr pScreen); -void RootlessSetPixmapOfAncestors(WindowPtr pWin); +void RootlessSetPixmapOfAncestors(ProtocolWindowPtr pWin); #endif /* _ROOTLESSCOMMON_H */ diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index c4a32aa0d..955041571 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -78,7 +78,7 @@ static Bool windows_hidden; #define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x))) void -RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state) +RootlessNativeWindowStateChanged (ProtocolWindowPtr pWin, unsigned int state) { RootlessWindowRec *winRec; @@ -92,7 +92,7 @@ RootlessNativeWindowStateChanged (WindowPtr pWin, unsigned int state) pWin->rootlessUnhittable = winRec->is_offscreen; } -void RootlessNativeWindowMoved (WindowPtr pWin) { +void RootlessNativeWindowMoved (ProtocolWindowPtr pWin) { xp_box bounds; int sx, sy, err; XID vlist[2]; diff --git a/randr/randr.c b/randr/randr.c index d33712928..2e97f0e8f 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -286,7 +286,7 @@ static int RRFreeClient (pointer data, XID id) { RREventPtr pRREvent; - WindowPtr pWin; + ProtocolWindowPtr pWin; RREventPtr *pHead, pCur, pPrev; pRREvent = (RREventPtr) data; @@ -367,7 +367,7 @@ RRExtensionInit (void) } static int -TellChanged (WindowPtr pWin, pointer value) +TellChanged (ProtocolWindowPtr pWin, pointer value) { RREventPtr *pHead, pRREvent; ClientPtr client; diff --git a/randr/randrstr.h b/randr/randrstr.h index d8dd37d96..5454da298 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -320,7 +320,7 @@ typedef struct _RREvent *RREventPtr; typedef struct _RREvent { RREventPtr next; ClientPtr client; - WindowPtr window; + ProtocolWindowPtr window; XID clientResource; int mask; } RREventRec; @@ -440,7 +440,7 @@ ProcRRGetScreenInfo (ClientPtr client); * Deliver a ScreenNotify event */ extern _X_EXPORT void -RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen); +RRDeliverScreenEvent (ClientPtr client, ProtocolWindowPtr pWin, ScreenPtr pScreen); /* randr.c */ /* @@ -549,7 +549,7 @@ RRCrtcNotify (RRCrtcPtr crtc, RROutputPtr *outputs); extern _X_EXPORT void -RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc); +RRDeliverCrtcEvent (ClientPtr client, ProtocolWindowPtr pWin, RRCrtcPtr crtc); /* * Request that the Crtc be reconfigured @@ -816,7 +816,7 @@ RROutputSetPhysicalSize (RROutputPtr output, int mmHeight); extern _X_EXPORT void -RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output); +RRDeliverOutputEvent(ClientPtr client, ProtocolWindowPtr pWin, RROutputPtr output); extern _X_EXPORT void RROutputDestroy (RROutputPtr output); diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index d4d8f2ad2..36d52f195 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -246,7 +246,7 @@ RRCrtcNotify (RRCrtcPtr crtc, } void -RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc) +RRDeliverCrtcEvent (ClientPtr client, ProtocolWindowPtr pWin, RRCrtcPtr crtc) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv (pScreen); diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c index ac4d2acc1..a1ee441b5 100644 --- a/randr/rrdispatch.c +++ b/randr/rrdispatch.c @@ -74,7 +74,7 @@ ProcRRSelectInput (ClientPtr client) REQUEST(xRRSelectInputReq); rrClientPriv(client); RRTimesPtr pTimes; - WindowPtr pWin; + ProtocolWindowPtr pWin; RREventPtr pRREvent, *pHead; XID clientResource; int rc; diff --git a/randr/rrmode.c b/randr/rrmode.c index d7560dcb2..8d14c66b5 100644 --- a/randr/rrmode.c +++ b/randr/rrmode.c @@ -289,7 +289,7 @@ ProcRRCreateMode (ClientPtr client) { REQUEST(xRRCreateModeReq); xRRCreateModeReply rep = {0}; - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; xRRModeInfo *modeInfo; diff --git a/randr/rroutput.c b/randr/rroutput.c index 5edeb7dd2..2164d7d26 100644 --- a/randr/rroutput.c +++ b/randr/rroutput.c @@ -325,7 +325,7 @@ RROutputSetPhysicalSize (RROutputPtr output, void -RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output) +RRDeliverOutputEvent(ClientPtr client, ProtocolWindowPtr pWin, RROutputPtr output) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv (pScreen); @@ -563,7 +563,7 @@ ProcRRSetOutputPrimary(ClientPtr client) { REQUEST(xRRSetOutputPrimaryReq); RROutputPtr output = NULL; - WindowPtr pWin; + ProtocolWindowPtr pWin; rrScrPrivPtr pScrPriv; int rc; @@ -592,7 +592,7 @@ int ProcRRGetOutputPrimary(ClientPtr client) { REQUEST(xRRGetOutputPrimaryReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; rrScrPrivPtr pScrPriv; xRRGetOutputPrimaryReply rep; RROutputPtr primary = NULL; diff --git a/randr/rrpointer.c b/randr/rrpointer.c index 6b934c0c6..a734cbeee 100644 --- a/randr/rrpointer.c +++ b/randr/rrpointer.c @@ -136,7 +136,7 @@ RRPointerMoved (ScreenPtr pScreen, int x, int y) void RRPointerScreenConfigured (ScreenPtr pScreen) { - WindowPtr pRoot; + ProtocolWindowPtr pRoot; ScreenPtr pCurrentScreen; int x, y; DeviceIntPtr pDev; diff --git a/randr/rrproperty.c b/randr/rrproperty.c index ba04c16e2..3e884e814 100644 --- a/randr/rrproperty.c +++ b/randr/rrproperty.c @@ -25,7 +25,7 @@ #include "swaprep.h" static int -DeliverPropertyEvent(WindowPtr pWin, void *value) +DeliverPropertyEvent(ProtocolWindowPtr pWin, void *value) { xRROutputPropertyNotifyEvent *event = value; RREventPtr *pHead, pRREvent; diff --git a/randr/rrscreen.c b/randr/rrscreen.c index 1bc1a9ea1..464d4e1e7 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -73,7 +73,7 @@ RREditConnectionInfo (ScreenPtr pScreen) void RRSendConfigNotify (ScreenPtr pScreen) { - WindowPtr pWin = pScreen->root; + ProtocolWindowPtr pWin = pScreen->root; xEvent event; event.u.u.type = ConfigureNotify; @@ -88,16 +88,16 @@ RRSendConfigNotify (ScreenPtr pScreen) event.u.configureNotify.height = pWin->drawable.height; event.u.configureNotify.borderWidth = wBorderWidth (pWin); event.u.configureNotify.override = pWin->overrideRedirect; - DeliverEvents(pWin, &event, 1, NullWindow); + DeliverEvents(pWin, &event, 1, NullProtocolWindow); } void -RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen) +RRDeliverScreenEvent (ClientPtr client, ProtocolWindowPtr pWin, ScreenPtr pScreen) { rrScrPriv (pScreen); xRRScreenChangeNotifyEvent se; RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL; - WindowPtr pRoot = pScreen->root; + ProtocolWindowPtr pRoot = pScreen->root; se.type = RRScreenChangeNotify + RREventBase; se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0); @@ -198,7 +198,7 @@ ProcRRGetScreenSizeRange (ClientPtr client) { REQUEST(xRRGetScreenSizeRangeReq); xRRGetScreenSizeRangeReply rep; - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; int rc; @@ -249,7 +249,7 @@ int ProcRRSetScreenSize (ClientPtr client) { REQUEST(xRRSetScreenSizeReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; int i, rc; @@ -313,7 +313,7 @@ rrGetScreenResources(ClientPtr client, Bool query) { REQUEST(xRRGetScreenResourcesReq); xRRGetScreenResourcesReply rep; - WindowPtr pWin; + ProtocolWindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; CARD8 *extra; @@ -591,7 +591,7 @@ ProcRRGetScreenInfo (ClientPtr client) { REQUEST(xRRGetScreenInfoReq); xRRGetScreenInfoReply rep; - WindowPtr pWin; + ProtocolWindowPtr pWin; int n, rc; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c index c1bd5bb33..081fc89cd 100644 --- a/randr/rrxinerama.c +++ b/randr/rrxinerama.c @@ -112,7 +112,7 @@ int ProcRRXineramaGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xPanoramiXGetStateReply rep; register int n, rc; ScreenPtr pScreen; @@ -178,7 +178,7 @@ int ProcRRXineramaGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; xPanoramiXGetScreenCountReply rep; register int n, rc; @@ -205,7 +205,7 @@ int ProcRRXineramaGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); - WindowPtr pWin, pRoot; + ProtocolWindowPtr pWin, pRoot; ScreenPtr pScreen; xPanoramiXGetScreenSizeReply rep; register int n, rc; diff --git a/render/mipict.c b/render/mipict.c index 08b2fa722..705e60f57 100644 --- a/render/mipict.c +++ b/render/mipict.c @@ -134,7 +134,7 @@ miValidatePicture (PicturePtr pPicture, { if (pDrawable->type == DRAWABLE_WINDOW) { - WindowPtr pWin = (WindowPtr) pDrawable; + ProtocolWindowPtr pWin = (ProtocolWindowPtr) pDrawable; RegionPtr pregWin; Bool freeTmpClip, freeCompClip; diff --git a/xfixes/cursor.c b/xfixes/cursor.c index fb608f694..cdb8969c9 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -85,7 +85,7 @@ typedef struct _CursorEvent { CursorEventPtr next; CARD32 eventMask; ClientPtr pClient; - WindowPtr pWindow; + ProtocolWindowPtr pWindow; XID clientResource; } CursorEventRec; @@ -197,7 +197,7 @@ CursorCloseScreen (int index, ScreenPtr pScreen) static int XFixesSelectCursorInput (ClientPtr pClient, - WindowPtr pWindow, + ProtocolWindowPtr pWindow, CARD32 eventMask) { CursorEventPtr *prev, e; @@ -259,7 +259,7 @@ int ProcXFixesSelectCursorInput (ClientPtr client) { REQUEST (xXFixesSelectCursorInputReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; int rc; REQUEST_SIZE_MATCH (xXFixesSelectCursorInputReq); @@ -613,14 +613,14 @@ static Bool ReplaceCursorLookup (pointer value, XID id, pointer closure) { ReplaceCursorLookupPtr rcl = (ReplaceCursorLookupPtr) closure; - WindowPtr pWin; + ProtocolWindowPtr pWin; GrabPtr pGrab; CursorPtr pCursor = 0, *pCursorRef = 0; XID cursor = 0; switch (rcl->type) { case RT_WINDOW: - pWin = (WindowPtr) value; + pWin = (ProtocolWindowPtr) value; if (pWin->optional) { pCursorRef = &pWin->optional->cursor; @@ -866,7 +866,7 @@ deleteCursorHideCountsForScreen (ScreenPtr pScreen) int ProcXFixesHideCursor (ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; CursorHideCountPtr pChc; REQUEST(xXFixesHideCursorReq); int ret; @@ -929,7 +929,7 @@ SProcXFixesHideCursor (ClientPtr client) int ProcXFixesShowCursor (ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; CursorHideCountPtr pChc; int rc; REQUEST(xXFixesShowCursorReq); @@ -1015,7 +1015,7 @@ CursorFreeHideCount (pointer data, XID id) static int CursorFreeWindow (pointer data, XID id) { - WindowPtr pWindow = (WindowPtr) data; + ProtocolWindowPtr pWindow = (ProtocolWindowPtr) data; CursorEventPtr e, next; for (e = cursorEvents; e; e = next) diff --git a/xfixes/region.c b/xfixes/region.c index 81ead4d1c..790920317 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -153,7 +153,7 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client) { RegionPtr pRegion; Bool copy = TRUE; - WindowPtr pWin; + ProtocolWindowPtr pWin; int rc; REQUEST (xXFixesCreateRegionFromWindowReq); @@ -657,12 +657,12 @@ SProcXFixesSetGCClipRegion (ClientPtr client) return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } -typedef RegionPtr (*CreateDftPtr)(WindowPtr pWin); +typedef RegionPtr (*CreateDftPtr)(ProtocolWindowPtr pWin); int ProcXFixesSetWindowShapeRegion (ClientPtr client) { - WindowPtr pWin; + ProtocolWindowPtr pWin; RegionPtr pRegion; RegionPtr *pDestRegion; int rc; @@ -731,7 +731,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) if (*pDestRegion) RegionDestroy(*pDestRegion); *pDestRegion = pRegion; - (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); + (*pWin->drawable.pScreen->SetShape) ((WindowPtr)pWin, stuff->destKind); SendShapeNotify (pWin, stuff->destKind); return Success; } diff --git a/xfixes/saveset.c b/xfixes/saveset.c index 35d8e17e0..6302557fc 100644 --- a/xfixes/saveset.c +++ b/xfixes/saveset.c @@ -31,7 +31,7 @@ ProcXFixesChangeSaveSet(ClientPtr client) { Bool toRoot, map; int result; - WindowPtr pWin; + ProtocolWindowPtr pWin; REQUEST(xXFixesChangeSaveSetReq); REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); diff --git a/xfixes/select.c b/xfixes/select.c index baf1ef8f4..fc57d4e25 100644 --- a/xfixes/select.c +++ b/xfixes/select.c @@ -44,7 +44,7 @@ typedef struct _SelectionEvent { Atom selection; CARD32 eventMask; ClientPtr pClient; - WindowPtr pWindow; + ProtocolWindowPtr pWindow; XID clientResource; } SelectionEventRec; @@ -128,7 +128,7 @@ CheckSelectionCallback (void) static int XFixesSelectSelectionInput (ClientPtr pClient, Atom selection, - WindowPtr pWindow, + ProtocolWindowPtr pWindow, CARD32 eventMask) { pointer val; @@ -201,7 +201,7 @@ int ProcXFixesSelectSelectionInput (ClientPtr client) { REQUEST (xXFixesSelectSelectionInputReq); - WindowPtr pWin; + ProtocolWindowPtr pWin; int rc; REQUEST_SIZE_MATCH (xXFixesSelectSelectionInputReq); @@ -265,7 +265,7 @@ SelectionFreeClient (pointer data, XID id) static int SelectionFreeWindow (pointer data, XID id) { - WindowPtr pWindow = (WindowPtr) data; + ProtocolWindowPtr pWindow = (ProtocolWindowPtr) data; SelectionEventPtr e, next; for (e = selectionEvents; e; e = next) @@ -354,7 +354,7 @@ ProcXkbSelectEvents(ClientPtr client) * Ring a bell on the given device for the given client. */ static int -_XkbBell(ClientPtr client, DeviceIntPtr dev, WindowPtr pWin, +_XkbBell(ClientPtr client, DeviceIntPtr dev, ProtocolWindowPtr pWin, int bellClass, int bellID, int pitch, int duration, int percent, int forceSound, int eventOnly, Atom name) { @@ -461,7 +461,7 @@ ProcXkbBell(ClientPtr client) { REQUEST(xkbBellReq); DeviceIntPtr dev; - WindowPtr pWin; + ProtocolWindowPtr pWin; int rc; REQUEST_SIZE_MATCH(xkbBellReq); diff --git a/xkb/xkbEvents.c b/xkb/xkbEvents.c index c020e5e2a..a8e3d0033 100644 --- a/xkb/xkbEvents.c +++ b/xkb/xkbEvents.c @@ -490,7 +490,7 @@ XkbHandleBell( BOOL force, pointer pCtrl, CARD8 class, Atom name, - WindowPtr pWin, + ProtocolWindowPtr pWin, ClientPtr pClient) { xkbBellNotify bn; |