mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
Redraw window borders when switching window pixmaps around
Make cw "own" the window pixmaps by wrapping
GetWindowPixmap/SetWindowPixmap.
This commit is contained in:
parent
597fdae93e
commit
9433085179
4 changed files with 69 additions and 14 deletions
|
|
@ -69,6 +69,23 @@ typedef struct _compPixmapVisit {
|
|||
PixmapPtr pPixmap;
|
||||
} CompPixmapVisitRec, *CompPixmapVisitPtr;
|
||||
|
||||
static Bool
|
||||
compRepaintBorder (ClientPtr pClient, pointer closure)
|
||||
{
|
||||
WindowPtr pWindow = LookupWindow ((XID) closure, pClient);
|
||||
|
||||
if (pWindow)
|
||||
{
|
||||
RegionRec exposed;
|
||||
|
||||
REGION_NULL(pScreen, &exposed);
|
||||
REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize);
|
||||
(*pWindow->drawable.pScreen->PaintWindowBorder)(pWindow, &exposed, PW_BORDER);
|
||||
REGION_UNINIT(pScreen, &exposed);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
compSetPixmapVisitWindow (WindowPtr pWindow, pointer data)
|
||||
{
|
||||
|
|
@ -85,6 +102,9 @@ compSetPixmapVisitWindow (WindowPtr pWindow, pointer data)
|
|||
*/
|
||||
SetWinSize (pWindow);
|
||||
SetBorderSize (pWindow);
|
||||
if (HasBorder (pWindow))
|
||||
QueueWorkProc (compRepaintBorder, serverClient,
|
||||
(pointer) pWindow->drawable.id);
|
||||
return WT_WALKCHILDREN;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue