X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/644231539d2ccf9ef873060154079f33ba7a42db..56acdfef2f2759bbc03c2fab5f7da25f6ca6d563:/src/x11/region.cpp diff --git a/src/x11/region.cpp b/src/x11/region.cpp index 1f7f4d5929..0b5130d9be 100644 --- a/src/x11/region.cpp +++ b/src/x11/region.cpp @@ -149,6 +149,12 @@ void wxRegion::Clear() bool wxRegion::Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) { + // work around for XUnionRectWithRegion() bug: taking a union with an empty + // rect results in an empty region (at least XFree 3.3.6 and 4.0 have this + // problem) + if ( !width || !height ) + return TRUE; + XRectangle rect; rect.x = x; rect.y = y;