diff options
author | marha <marha@users.sourceforge.net> | 2014-11-29 16:13:30 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-11-29 16:13:30 +0100 |
commit | 7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c (patch) | |
tree | e5b941fdff86328a065c46582ba53e0cc73c8576 /xorg-server/hw/xnest | |
parent | 0dbe845b2f4ba08924d6fcb9634d09dc3dde13d6 (diff) | |
parent | a1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 (diff) | |
download | vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.tar.gz vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.tar.bz2 vcxsrv-7147e58c389cffeb930bdd8e3a2fdfc5d5bb3a0c.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/dix/dispatch.c
xorg-server/hw/xwin/ddraw.h
xorg-server/hw/xwin/glx/glshim.c
xorg-server/hw/xwin/winclipboard/xevents.c
xorg-server/hw/xwin/windialogs.c
xorg-server/hw/xwin/winmultiwindowshape.c
xorg-server/hw/xwin/winmultiwindowwindow.c
xorg-server/hw/xwin/winprefslex.l
xorg-server/hw/xwin/winshadddnl.c
xorg-server/hw/xwin/winshadgdi.c
xorg-server/hw/xwin/winwndproc.c
xorg-server/mi/miarc.c
xorg-server/os/connection.c
Diffstat (limited to 'xorg-server/hw/xnest')
-rw-r--r-- | xorg-server/hw/xnest/Color.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xnest/GC.c | 56 | ||||
-rw-r--r-- | xorg-server/hw/xnest/XNGC.h | 1 | ||||
-rw-r--r-- | xorg-server/hw/xnest/Xnest.h | 2 |
4 files changed, 14 insertions, 47 deletions
diff --git a/xorg-server/hw/xnest/Color.c b/xorg-server/hw/xnest/Color.c index 95c334308..8d9d35621 100644 --- a/xorg-server/hw/xnest/Color.c +++ b/xorg-server/hw/xnest/Color.c @@ -239,7 +239,7 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) xnestNumOldInstalledColormapWindows = icws.numWindows; #ifdef DUMB_WINDOW_MANAGERS - /* + /* This code is for dumb window managers. This will only work with default local visual colormaps. */ diff --git a/xorg-server/hw/xnest/GC.c b/xorg-server/hw/xnest/GC.c index 0ec60fcdc..96af6eb91 100644 --- a/xorg-server/hw/xnest/GC.c +++ b/xorg-server/hw/xnest/GC.c @@ -194,11 +194,12 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) BoxPtr pBox; XRectangle *pRects; - xnestDestroyClipHelper(pGC); + xnestDestroyClip(pGC); switch (type) { case CT_NONE: XSetClipMask(xnestDisplay, xnestGC(pGC), None); + pValue = NULL; break; case CT_REGION: @@ -224,11 +225,9 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) * Need to change into region, so subsequent uses are with * current pixmap contents. */ - pGC->clientClip = - (void *) (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue); + pGC->clientClip = (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue); (*pGC->pScreen->DestroyPixmap) ((PixmapPtr) pValue); pValue = pGC->clientClip; - type = CT_REGION; break; case CT_UNSORTED: @@ -264,65 +263,34 @@ xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) case CT_YSORTED: case CT_YXSORTED: case CT_YXBANDED: - - /* - * other parts of server can only deal with CT_NONE, - * CT_PIXMAP and CT_REGION client clips. - */ - pGC->clientClip = (void *) RegionFromRects(nRects, - (xRectangle *) pValue, - type); + /* server clip representation is a region */ + pGC->clientClip = RegionFromRects(nRects, (xRectangle *) pValue, type); free(pValue); pValue = pGC->clientClip; - type = CT_REGION; - break; } - pGC->clientClipType = type; pGC->clientClip = pValue; } void xnestDestroyClip(GCPtr pGC) { - xnestDestroyClipHelper(pGC); - - XSetClipMask(xnestDisplay, xnestGC(pGC), None); - - pGC->clientClipType = CT_NONE; - pGC->clientClip = NULL; -} - -void -xnestDestroyClipHelper(GCPtr pGC) -{ - switch (pGC->clientClipType) { - default: - case CT_NONE: - break; - - case CT_REGION: + if (pGC->clientClip) { RegionDestroy(pGC->clientClip); - break; + XSetClipMask(xnestDisplay, xnestGC(pGC), None); + pGC->clientClip = NULL; } } void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc) { - RegionPtr pRgn; - - switch (pGCSrc->clientClipType) { - default: - case CT_NONE: - xnestDestroyClip(pGCDst); - break; - - case CT_REGION: - pRgn = RegionCreate(NULL, 1); + if (pGCSrc->clientClip) { + RegionPtr pRgn = RegionCreate(NULL, 1); RegionCopy(pRgn, pGCSrc->clientClip); xnestChangeClip(pGCDst, CT_REGION, pRgn, 0); - break; + } else { + xnestDestroyClip(pGCDst); } } diff --git a/xorg-server/hw/xnest/XNGC.h b/xorg-server/hw/xnest/XNGC.h index e2f10fb9c..974173e50 100644 --- a/xorg-server/hw/xnest/XNGC.h +++ b/xorg-server/hw/xnest/XNGC.h @@ -37,7 +37,6 @@ void xnestCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); void xnestDestroyGC(GCPtr pGC); void xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects); void xnestDestroyClip(GCPtr pGC); -void xnestDestroyClipHelper(GCPtr pGC); void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc); #endif /* XNESTGC_H */ diff --git a/xorg-server/hw/xnest/Xnest.h b/xorg-server/hw/xnest/Xnest.h index adb9daf8b..37ea6e532 100644 --- a/xorg-server/hw/xnest/Xnest.h +++ b/xorg-server/hw/xnest/Xnest.h @@ -28,7 +28,7 @@ from the X Consortium. */ -/* +/* ** Machines with a 64 bit library interface and a 32 bit server require ** name changes to protect the guilty. */ |