Remove wxSTAY_ON_TOP from splash screen on Windows to stop it hiding
authorCarl Hetherington <cth@carlh.net>
Tue, 23 Feb 2021 00:47:21 +0000 (01:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 23 Feb 2021 19:11:23 +0000 (20:11 +0100)
error dialogues that pop up during startup.

src/tools/dcpomatic.cc
src/wx/wx_util.cc

index be172ed2d0e29b5ec27af78a0f0630704d0eebc4..f8ee17bce355343064db1fd752774b72e9f72b37 100644 (file)
@@ -1784,14 +1784,12 @@ private:
 
        void config_failed_to_load ()
        {
-               close_splash ();
                message_dialog (_frame, _("The existing configuration failed to load.  Default values will be used instead.  These may take a short time to create."));
        }
 
        void config_warning (string m)
        {
-               close_splash ();
-               message_dialog (_frame, std_to_wx (m));
+               message_dialog (_frame, std_to_wx(m));
        }
 
        bool config_bad (Config::BadReason reason)
index 192724b13328ba496a87ab38198b14da71efe16e..77980a0133ac43243172c4e7f12dca3f3e3b29a0 100644 (file)
@@ -476,6 +476,7 @@ setup_audio_channels_choice (wxChoice* choice, int minimum)
        checked_set (choice, items);
 }
 
+
 wxSplashScreen *
 maybe_show_splash ()
 {
@@ -483,7 +484,12 @@ maybe_show_splash ()
        try {
                wxBitmap bitmap;
                if (bitmap.LoadFile(bitmap_path("splash"), wxBITMAP_TYPE_PNG)) {
+#ifdef DCPOMATIC_WINDOWS
+                       /* Having wxSTAY_ON_TOP means error dialogues hide behind the splash screen on Windows, no matter what I try */
+                       splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE | wxFRAME_NO_TASKBAR);
+#else
                        splash = new wxSplashScreen (bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT, 0, 0, -1);
+#endif
                        wxYield ();
                }
        } catch (boost::filesystem::filesystem_error& e) {