mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-30 21:21:39 +02:00
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>
This commit is contained in:
parent
73fec95358
commit
bb06db5a62
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue