diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2024-06-30 12:37:04 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2024-06-30 12:37:04 +0200 |
commit | 314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c (patch) | |
tree | 4ca541c9c14b9b015e5f12227e784a7a418d8d9a /nx-X11/programs/Xserver/hw/nxagent/Drawable.c | |
parent | e18eb77f397b72c1a10141d2bafa2dc975ab7d38 (diff) | |
parent | 8f3b446b1336d2c54690468c062c3098df96ba96 (diff) | |
download | nx-libs-314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c.tar.gz nx-libs-314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c.tar.bz2 nx-libs-314ec41b8e26ba6d161f0a47d08ce5f239d9bb1c.zip |
Merge branch 'uli42-pr/various10' into 3.6.x
Attribute GH PR #1075: https://github.com/ArcticaProject/nx-libs/pull/1075
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Drawable.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 121d54953..a44818f4c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -117,7 +117,7 @@ void nxagentExposeBackgroundPredicate(void *p0, XID x1, void *p2); * Imported from NXresource.c */ -extern int nxagentFindClientResource(int, RESTYPE, void *); +extern Bool nxagentFindClientResource(int, RESTYPE, void *); unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel); unsigned long nxagentGetDrawableColor(DrawablePtr pDrawable); @@ -282,6 +282,13 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask static int totalLength; static int totalReconnectedPixmaps; + int width = pDrawable -> width; + int height = pDrawable -> height; + int depth = pDrawable -> depth; + + unsigned int format = (depth == 1) ? XYPixmap : ZPixmap; + int length = nxagentImageLength(width, height, format, 0, depth); + totalLength += length; totalReconnectedPixmaps++; @@ -1351,12 +1358,12 @@ FIXME: All drawables should be set as synchronized and never marked as */ if (nxagentSynchronization.pDrawable != NULL && - nxagentFindClientResource(serverClient -> index, RT_NX_CORR_WINDOW, - nxagentSynchronization.pDrawable) == 0 && - nxagentFindClientResource(serverClient -> index, RT_NX_CORR_BACKGROUND, - nxagentSynchronization.pDrawable) == 0 && - nxagentFindClientResource(serverClient -> index, RT_NX_CORR_PIXMAP, - nxagentSynchronization.pDrawable) == 0) + !nxagentFindClientResource(serverClient -> index, RT_NX_CORR_WINDOW, + nxagentSynchronization.pDrawable) && + !nxagentFindClientResource(serverClient -> index, RT_NX_CORR_BACKGROUND, + nxagentSynchronization.pDrawable) && + !nxagentFindClientResource(serverClient -> index, RT_NX_CORR_PIXMAP, + nxagentSynchronization.pDrawable)) { #ifdef TEST fprintf(stderr, "nxagentSynchronizationLoop: Synchronization drawable [%p] removed from resources.\n", @@ -1531,11 +1538,11 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion) { #ifdef TEST - x = pRegion -> extents.x1; - y = pRegion -> extents.y1; + int x = pRegion -> extents.x1; + int y = pRegion -> extents.y1; - width = pRegion -> extents.x2 - pRegion -> extents.x1; - height = pRegion -> extents.y2 - pRegion -> extents.y1; + int width = pRegion -> extents.x2 - pRegion -> extents.x1; + int height = pRegion -> extents.y2 - pRegion -> extents.y1; fprintf(stderr, "nxagentMarkCorruptedRegion: Partly invalidating %s [%p] with " "coordinates [%d,%d][%d,%d].\n", nxagentDrawableType(pDrawable), |