diff options
author | Keith Packard <keithp@keithp.com> | 2004-08-15 00:43:39 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2004-08-15 00:43:39 +0000 |
commit | 943308517905d16bda1bb27cd745bd291a84dbf6 (patch) | |
tree | 7653867ea1f694805a57d2bfb714d865d0bb2969 /composite | |
parent | 597fdae93e6e1b7e4052097baf3d91e7a134c162 (diff) |
Redraw window borders when switching window pixmaps around
Make cw "own" the window pixmaps by wrapping
GetWindowPixmap/SetWindowPixmap.
Diffstat (limited to 'composite')
-rw-r--r-- | composite/compwindow.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/composite/compwindow.c b/composite/compwindow.c index 314593f25..f630008a6 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -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; } |