diff options
author | Daniel van Vugt <daniel.van.vugt@canonical.com> | 2023-09-12 16:01:15 +0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-09-14 16:33:29 +0000 |
commit | bb06db5a62f680c6a0e51d12339aeb2dd069999b (patch) | |
tree | bb16e689ddece6d8751bea683ac86cdbf023eaec /src/glx | |
parent | 73fec95358ea52af62d1d067c8b17c8b881f4de6 (diff) |
glx: Increment dpy->request before issuing an error that had no request
This ensures the sequence number is unique and recent enough for callers
of `glXQueryDrawable` using `XNextRequest` to selectively trap errors.
The same approach is already used in `glXCreateContextAttribsARB`.
Suggested-by: Sebastian Keller <skeller@gnome.org>
Related-to: https://gitlab.gnome.org/GNOME/mutter/-/issues/3007
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25173>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glx_pbuffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index 0b3cdfaa587..d95a3e90c24 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -239,6 +239,7 @@ __glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable, * generated." */ if (drawable == 0) { + XNoOp(dpy); __glXSendError(dpy, GLXBadDrawable, 0, X_GLXGetDrawableAttributes, false); return 0; } @@ -269,6 +270,7 @@ __glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable, if (pdraw == NULL || gc == &dummyContext || gc->currentDpy != dpy || (gc->currentDrawable != drawable && gc->currentReadable != drawable)) { + XNoOp(dpy); __glXSendError(dpy, GLXBadDrawable, drawable, X_GLXGetDrawableAttributes, false); return 0; |