mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-24 17:08:23 +02:00
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:
parent
b45c74f0f2
commit
ebaf36bb38
1 changed files with 7 additions and 14 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue