From 37cd66c9507d170cb5c982c575b3d8fe18249195 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Mon, 28 Jun 2010 22:15:40 +0000 Subject: [PATCH] Make the cool stuff in r4606 a little less cool, but apparently wxGtk doesn't let you freeze invisible windows and get away with it, so we'll have to live with a little extra flicker. Originally committed to SVN as r4636. --- aegisub/src/frame_main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp index ec495e3c1..928510c48 100644 --- a/aegisub/src/frame_main.cpp +++ b/aegisub/src/frame_main.cpp @@ -213,8 +213,8 @@ FrameMain::FrameMain (wxArrayString args) PerformVersionCheck(false); StartupLog(_T("Display main window")); - Freeze(); Show(); + Freeze(); SetDisplayMode(1, 1); Thaw(); @@ -856,8 +856,9 @@ void FrameMain::SetDisplayMode(int video, int audio) { showVideo = sv; showAudio = sa; - // Stop - Freeze(); + bool didFreeze = !IsFrozen(); + if (didFreeze) Freeze(); + VideoContext::Get()->Stop(); // Set display @@ -871,9 +872,9 @@ void FrameMain::SetDisplayMode(int video, int audio) { MainSizer->RecalcSizes(); MainSizer->Layout(); Layout(); - Show(true); if (showVideo) VideoContext::Get()->UpdateDisplays(true); - Thaw(); + + if (didFreeze) Thaw(); } /// @brief Update title bar