From 4875a15ca61358a1c95b156b2279fce092451278 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 19 Jan 2022 00:45:43 +0100 Subject: Update libNX_X11 to upstream's libX11-1.7.3.1-10-gd60ede78 --- nx-X11/lib/src/GetWAttrs.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'nx-X11/lib/src/GetWAttrs.c') 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); -- cgit v1.2.3