present: Send a PresentConfigureNotify event for destroyed windows
This is a fix for a deadlock case, where the client ends up blocked waiting for a Present event that will never come because the window was destroyed.
The fix as written is a bit hacky. Clients will simply be sent this new
kind of event rather than selecting for a new PresentDestroyNotify
, and
the values in the event run the risk of making the client do something
"illegal", 0x0 isn't a valid size for example. In practice I expect it's
fine, most clients are not expecting to survive their GLXWindow
being
ripped out from under them, which means this simply promotes a
deadlock-on-exit to a crash-on-exit.
Posting this for discussion, I don't have a ton of time to follow up on this and I don't really care whether this is sent unconditionally or needs a whole new protocol bump. Frankly if I were bumping the protocol this is a pretty half-assed solution and #1428 is what I'd rather see. Regardless, someone decide and push this across the finish line please.
Merge request reports
Activity
As discussed before, using another field of the event which isn't already used by Mesa wouldn't risk regressions.
this simply promotes a deadlock-on-exit to a crash-on-exit
Closing a window doesn't imply the application will exit. For applications not affected by the deadlock, this could turn closing one of its windows into a crash.
pixmap_flags
is already not used by Mesa, yes.EDIT: I suppose there's no real reason to zero out the window geometry, so the 0x0 thing isn't necessary. But the new
pixmap_flags
, that we should definitely keep.Edited by Adam JacksonDone.
- Rephrased the commit message
- Renamed
PresentPixmapDestroyed
toPresentWindowDestroyed
- Keep the original window size + border width + sibling intact when sending the
PresentWindowDestroyed
flag
Edited by Olivier Fourdan
changed milestone to %xwayland-23.1.0
mentioned in issue #1426 (closed)
added 146 commits
-
2ea05583...098fcedf - 145 commits from branch
xorg:master
- 74a93b70 - present: Send a PresentConfigureNotify event for destroyed windows
-
2ea05583...098fcedf - 145 commits from branch
74a93b70 is
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
(assuming there's no time to get the new flag into a xorgproto release before creating the
xwayland-23.1
branch)I've filed xorg/proto/xorgproto#43 for this, so we do not forget.
added 1 commit
- 462b0603 - present: Send a PresentConfigureNotify event for destroyed windows
mentioned in issue xorg/proto/xorgproto#43
mentioned in merge request mesa/mesa!21339 (merged)
added present label
mentioned in issue mesa/mesa#9152 (closed)