From ebaf36bb38814f0e0b2a85d43e88c07f474ea157 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 25 Oct 2018 10:17:04 -0400 Subject: [PATCH] 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 --- composite/compwindow.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/composite/compwindow.c b/composite/compwindow.c index 54b4e6ac4..c974d1550 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -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; }