Wayland: Deduplicate cleanup logic#116513
Conversation
816dce9 to
a9c39ab
Compare
|
Oops I just noticed that we're iterating while removing elements from the Edit: The I'm afraid I might have ran into undefined behavior indeed, or at least something unpredictable. I'll fix this ASAP. |
a9c39ab to
f8f12d1
Compare
|
Should be fixed, but I'm double-checking on my VM with some debug logging to make sure. While |
|
All right, no regressions on the usual compositors I test with. Everything should be good now, sorry for the mess. |
|
Needs a rebase after #102987 |
We now reuse the `global_remove` event handler. This removes a considerable amount of duplication, minimizes human error (such as cleaning up a global in one place but not the other), and helps test the dynamic global removal logic.
f8f12d1 to
29e1bc5
Compare
|
Done! |
|
Thanks! |
We now reuse the
global_removeevent handler. This removes a considerable amount of duplication, minimizes human error (such as cleaning up a global in one place but not the other), and helps test the dynamic global removal logic.NOTE: I think that the window cleanup logic in
WaylandThread::destroyis broken. That said, the DS is supposed to clean all windows in the first place (and does so quite well), so I preserved it for now and added a warning. That'll do for now :P