diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-04-27 14:10:57 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-04-27 14:10:57 +0200 |
commit | 91d9218c0cc659f40918af6ac6c035c6c48d2c6d (patch) | |
tree | 79054df1730d4723658b02cec311bc8ba7655662 /nx-X11/lib/src/GetWAttrs.c | |
parent | a502149a844736dcc7f7dedd7c63229c74a448ee (diff) | |
parent | 4875a15ca61358a1c95b156b2279fce092451278 (diff) | |
download | nx-libs-91d9218c0cc659f40918af6ac6c035c6c48d2c6d.tar.gz nx-libs-91d9218c0cc659f40918af6ac6c035c6c48d2c6d.tar.bz2 nx-libs-91d9218c0cc659f40918af6ac6c035c6c48d2c6d.zip |
Merge branch 'uli42-pr/update_libX11_2022' into 3.6.x
Attributes GH PR #1037: https://github.com/ArcticaProject/nx-libs/pull/1037
Diffstat (limited to 'nx-X11/lib/src/GetWAttrs.c')
-rw-r--r-- | nx-X11/lib/src/GetWAttrs.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/nx-X11/lib/src/GetWAttrs.c b/nx-X11/lib/src/GetWAttrs.c index c10824cf4..0775eabc8 100644 --- a/nx-X11/lib/src/GetWAttrs.c +++ b/nx-X11/lib/src/GetWAttrs.c @@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group. #include "Xlibint.h" typedef struct _WAttrsState { - unsigned long attr_seq; - unsigned long geom_seq; + uint64_t attr_seq; + uint64_t geom_seq; XWindowAttributes *attr; } _XWAttrsState; @@ -47,10 +47,11 @@ _XWAttrsHandler( xGetWindowAttributesReply replbuf; register xGetWindowAttributesReply *repl; register XWindowAttributes *attr; + uint64_t last_request_read = X_DPY_GET_LAST_REQUEST_READ(dpy); state = (_XWAttrsState *)data; - if (dpy->last_request_read != state->attr_seq) { - if (dpy->last_request_read == state->geom_seq && + if (last_request_read != state->attr_seq) { + if (last_request_read == state->geom_seq && !state->attr && rep->generic.type == X_Error && rep->error.errorCode == BadDrawable) @@ -86,7 +87,7 @@ _XWAttrsHandler( Status _XGetWindowAttributes( - register Display *dpy, + Display *dpy, Window w, XWindowAttributes *attr) { @@ -99,7 +100,7 @@ _XGetWindowAttributes( GetResReq(GetWindowAttributes, w, req); - async_state.attr_seq = dpy->request; + async_state.attr_seq = X_DPY_GET_REQUEST(dpy); async_state.geom_seq = 0; async_state.attr = attr; async.next = dpy->async_handlers; @@ -109,7 +110,7 @@ _XGetWindowAttributes( GetResReq(GetGeometry, w, req); - async_state.geom_seq = dpy->request; + async_state.geom_seq = X_DPY_GET_REQUEST(dpy); if (!_XReply (dpy, (xReply *)&rep, 0, xTrue)) { DeqAsyncHandler(dpy, &async); |