From d995fe631a5706de93a05fda498333442af3d207 Mon Sep 17 00:00:00 2001 From: Roland Mainz Date: Wed, 2 Mar 2005 14:21:40 +0000 Subject: [PATCH] xc/programs/Xserver/hw/xnest/Screen.c xc/programs/Xserver/hw/xnest/Window.c //bugs.freedesktop.org/show_bug.cgi?id=2546) attachment #2005 (https://bugs.freedesktop.org/attachment.cgi?id=2005): Fix Xnest to update the shape regions in the backend server whenever a client changes them in Xnest (the fix is to add a new wrapper which calls |xnestShapeWindow()| before calling |miSetShape()|). Patch by Mark McLoughlin --- hw/xnest/Screen.c | 5 +++++ hw/xnest/Window.c | 7 +++++++ hw/xnest/XNWindow.h | 1 + 3 files changed, 13 insertions(+) diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 676e7748f..3dec48b5f 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -361,6 +361,11 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) if (!miScreenDevPrivateInit(pScreen, xnestWidth, NULL)) return FALSE; +#ifdef SHAPE + /* overwrite miSetShape with our own */ + pScreen->SetShape = xnestSetShape; +#endif /* SHAPE */ + /* devPrivates */ #define POSITION_OFFSET (pScreen->myNum * (xnestWidth + xnestHeight) / 32) diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index f7e04844e..a8d65fb7c 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -449,6 +449,13 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) } #ifdef SHAPE +void +xnestSetShape(WindowPtr pWin) +{ + xnestShapeWindow(pWin); + miSetShape(pWin); +} + static Bool xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2) { diff --git a/hw/xnest/XNWindow.h b/hw/xnest/XNWindow.h index cc49b2343..3a57646a7 100644 --- a/hw/xnest/XNWindow.h +++ b/hw/xnest/XNWindow.h @@ -73,6 +73,7 @@ void xnestClipNotify(WindowPtr pWin, int dx, int dy); void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed); #ifdef SHAPE +void xnestSetShape(WindowPtr pWin); void xnestShapeWindow(WindowPtr pWin); #endif /* SHAPE */