mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
wayland: Destroy the seats before stopping the cursor surface event thread
Stopping the thread also destroys the queue used by pointer surfaces, and if any seats still have a surface associated with the queue at that time, it will cause a libwayland warning. Destroying the seats first ensures that all surfaces associated with the thread queue are destroyed before the queue is destroyed.
This commit is contained in:
@@ -1512,11 +1512,8 @@ static void Wayland_VideoCleanup(SDL_VideoDevice *_this)
|
||||
{
|
||||
SDL_VideoData *data = _this->internal;
|
||||
SDL_WaylandSeat *seat, *tmp;
|
||||
int i;
|
||||
|
||||
Wayland_FiniMouse(data);
|
||||
|
||||
for (i = _this->num_displays - 1; i >= 0; --i) {
|
||||
for (int i = _this->num_displays - 1; i >= 0; --i) {
|
||||
SDL_VideoDisplay *display = _this->displays[i];
|
||||
Wayland_free_display(display, false);
|
||||
}
|
||||
@@ -1526,6 +1523,8 @@ static void Wayland_VideoCleanup(SDL_VideoDevice *_this)
|
||||
Wayland_SeatDestroy(seat, false);
|
||||
}
|
||||
|
||||
Wayland_FiniMouse(data);
|
||||
|
||||
if (data->pointer_constraints) {
|
||||
zwp_pointer_constraints_v1_destroy(data->pointer_constraints);
|
||||
data->pointer_constraints = NULL;
|
||||
|
||||
Reference in New Issue
Block a user