From 3bad6ecf0bd1166777961e121571c64f11f1cdb1 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 13 Oct 2020 09:24:08 -0700 Subject: [PATCH] Make sure window is shown before trying to show it full screen, see #18942 --- src/gtk/toplevel.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index c43add8016..4a54bd3930 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -910,6 +910,11 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long) if (show == m_fsIsShowing) return false; // return what? + // documented behaviour is to show the window if it's still hidden when + // showing it full screen + if (show) + Show(); + m_fsIsShowing = show; #if defined(GDK_WINDOWING_X11) && !defined(__WXGTK4__) @@ -992,11 +997,6 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long) } #endif // GDK_WINDOWING_X11 - // documented behaviour is to show the window if it's still hidden when - // showing it full screen - if (show) - Show(); - return true; }