Hacky window-on-top fix for OS X.
authorCarl Hetherington <cth@carlh.net>
Sat, 27 Aug 2016 23:05:35 +0000 (00:05 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 27 Aug 2016 23:05:35 +0000 (00:05 +0100)
src/wx/audio_dialog.cc
src/wx/timeline_dialog.cc
src/wx/video_waveform_dialog.cc

index b086782..ab59114 100644 (file)
@@ -49,7 +49,14 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
                _("Audio"),
                wxDefaultPosition,
                wxSize (640, 512),
+#ifdef DCPOMATIC_OSX
+               /* I can't get wxFRAME_FLOAT_ON_PARENT to work on OS X, and although wxSTAY_ON_TOP keeps
+                  the window above all others (and not just our own) it's better than nothing for now.
+               */
+               wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxSTAY_ON_TOP
+#else
                wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxFRAME_FLOAT_ON_PARENT
+#endif
                )
        , _film (film)
        , _content (content)
index 76a2c45..e050c27 100644 (file)
@@ -38,7 +38,14 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film)
                _("Timeline"),
                wxDefaultPosition,
                wxSize (640, 512),
+#ifdef DCPOMATIC_OSX
+               /* I can't get wxFRAME_FLOAT_ON_PARENT to work on OS X, and although wxSTAY_ON_TOP keeps
+                  the window above all others (and not just our own) it's better than nothing for now.
+               */
+               wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxSTAY_ON_TOP
+#else
                wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxFRAME_FLOAT_ON_PARENT
+#endif
                )
        , _film (film)
        , _timeline (this, cp, film)
index 412ebf8..1fd96ea 100644 (file)
@@ -36,7 +36,14 @@ VideoWaveformDialog::VideoWaveformDialog (wxWindow* parent, weak_ptr<const Film>
                _("Video Waveform"),
                wxDefaultPosition,
                wxSize (640, 512),
+#ifdef DCPOMATIC_OSX
+               /* I can't get wxFRAME_FLOAT_ON_PARENT to work on OS X, and although wxSTAY_ON_TOP keeps
+                  the window above all others (and not just our own) it's better than nothing for now.
+               */
+               wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxSTAY_ON_TOP
+#else
                wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxFULL_REPAINT_ON_RESIZE | wxFRAME_FLOAT_ON_PARENT
+#endif
                )
        , _viewer (viewer)
 {