mirror of https://github.com/snes9xgit/snes9x.git
Gtk/Wayland: Disable display driver during unfullscreening.
Gtk incorrectly doesn't resize widgets beneath a subsurface.
This commit is contained in:
parent
68af8fe783
commit
be6372c034
|
@ -965,6 +965,7 @@ void S9xDeinitDisplay()
|
|||
if (driver)
|
||||
driver->deinit();
|
||||
delete driver;
|
||||
driver = nullptr;
|
||||
|
||||
if (pool)
|
||||
{
|
||||
|
|
|
@ -1293,8 +1293,17 @@ void Snes9xWindow::leave_fullscreen_mode()
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_WINDOW(gdk_window))
|
||||
{
|
||||
S9xDeinitDisplay();
|
||||
}
|
||||
#endif
|
||||
|
||||
window->unfullscreen();
|
||||
|
||||
window->show();
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
if (GDK_IS_X11_WINDOW(gdk_window))
|
||||
{
|
||||
|
@ -1310,6 +1319,15 @@ void Snes9xWindow::leave_fullscreen_mode()
|
|||
config->rom_loaded = rom_loaded;
|
||||
config->fullscreen = 0;
|
||||
configure_widgets();
|
||||
window->show();
|
||||
|
||||
#ifdef GDK_WINDOWING_WAYLAND
|
||||
if (GDK_IS_WAYLAND_WINDOW(gdk_window))
|
||||
{
|
||||
S9xReinitDisplay();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void Snes9xWindow::resize_viewport(int width, int height)
|
||||
|
|
Loading…
Reference in New Issue