composite: Remove silly indirection around compRepaintBorder

If we need to repaint a window's border, then said window will certainly
still exist by the time we get around to ProcessWorkQueue. So there's no
reason to look it up by its XID, the WindowPtr itself is fine.

Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2018-10-25 10:17:04 -04:00
parent b45c74f0f2
commit ebaf36bb38

View file

@ -95,19 +95,13 @@ typedef struct _compPixmapVisit {
static Bool
compRepaintBorder(ClientPtr pClient, void *closure)
{
WindowPtr pWindow;
int rc =
dixLookupWindow(&pWindow, (XID) (intptr_t) closure, pClient,
DixWriteAccess);
WindowPtr pWindow = closure;
RegionRec exposed;
if (rc == Success) {
RegionRec exposed;
RegionNull(&exposed);
RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize);
pWindow->drawable.pScreen->PaintWindow(pWindow, &exposed, PW_BORDER);
RegionUninit(&exposed);
}
RegionNull(&exposed);
RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize);
pWindow->drawable.pScreen->PaintWindow(pWindow, &exposed, PW_BORDER);
RegionUninit(&exposed);
return TRUE;
}
@ -128,8 +122,7 @@ compSetPixmapVisitWindow(WindowPtr pWindow, void *data)
SetWinSize(pWindow);
SetBorderSize(pWindow);
if (pVisit->bw)
QueueWorkProc(compRepaintBorder, serverClient,
(void *) (intptr_t) pWindow->drawable.id);
QueueWorkProc(compRepaintBorder, serverClient, pWindow);
return WT_WALKCHILDREN;
}