mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-02-02 13:11:14 +00:00
wayland: Round trip after window show/hide operations.
Perform a round trip after showing/hiding the window to avoid protocol errors when ShowWindow() is called immediately after HideWindow().
This commit is contained in:
parent
17b329d199
commit
3685c64ed1
|
@ -1364,6 +1364,12 @@ void Wayland_ShowWindow(_THIS, SDL_Window *window)
|
||||||
unsetenv("XDG_ACTIVATION_TOKEN");
|
unsetenv("XDG_ACTIVATION_TOKEN");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Roundtrip required to avoid a possible protocol violation when
|
||||||
|
* HideWindow was called immediately before ShowWindow.
|
||||||
|
*/
|
||||||
|
WAYLAND_wl_display_roundtrip(c->display);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1412,6 +1418,10 @@ void Wayland_HideWindow(_THIS, SDL_Window *window)
|
||||||
wind->server_decoration = NULL;
|
wind->server_decoration = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Be sure to detach after this is done, otherwise ShowWindow crashes! */
|
||||||
|
wl_surface_attach(wind->surface, NULL, 0, 0);
|
||||||
|
wl_surface_commit(wind->surface);
|
||||||
|
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
if (WINDOW_IS_LIBDECOR(data, window)) {
|
if (WINDOW_IS_LIBDECOR(data, window)) {
|
||||||
if (wind->shell_surface.libdecor.frame) {
|
if (wind->shell_surface.libdecor.frame) {
|
||||||
|
@ -1433,9 +1443,11 @@ void Wayland_HideWindow(_THIS, SDL_Window *window)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Be sure to detach after this is done, otherwise ShowWindow crashes! */
|
/*
|
||||||
wl_surface_attach(wind->surface, NULL, 0, 0);
|
* Roundtrip required to avoid a possible protocol violation when
|
||||||
wl_surface_commit(wind->surface);
|
* ShowWindow is called immediately after HideWindow.
|
||||||
|
*/
|
||||||
|
WAYLAND_wl_display_roundtrip(data->display);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue