diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-30 13:50:15 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-30 13:50:45 -0400 |
commit | a9341bd5f03dad86161786c1f764471b23273601 (patch) | |
tree | 4465501fa58397365465c0fa1ba0a07f4b14adca /gtk2_ardour/splash.cc | |
parent | 63e4c37deffbedacf0a81359fd4615774c227556 (diff) |
improve relationship between ArdourDialog and Splash on OS X, where window restacking doesn't really work the way we need it to. more complex than anticipated because it seems that destroying a Gtk::Dialog does not emit its hide() or unmap() or unmap_event() signals
Diffstat (limited to 'gtk2_ardour/splash.cc')
-rw-r--r-- | gtk2_ardour/splash.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index 0922ec75ba..99adff68e9 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -25,6 +25,10 @@ #include "ardour/ardour.h" #include "ardour/filesystem_paths.h" +#ifdef check +#undef check +#endif + #include "gui_thread.h" #include "splash.h" @@ -96,15 +100,33 @@ Splash::~Splash () void Splash::pop_back_for (Gtk::Window& win) { +#ifdef __APPLE__ + /* April 2013: window layering on OS X is a bit different to X Window. at present, + the "restack()" functionality in GDK will only operate on windows in the same + "level" (e.g. two normal top level windows, or two utility windows) and will not + work across them. The splashscreen is on its own "StatusWindowLevel" so restacking + is not going to work. + + So for OS X, we just hide ourselves. + */ + hide(); +#else set_keep_above (false); get_window()->restack (win.get_window(), false); - win.signal_hide().connect (sigc::mem_fun (*this, &Splash::pop_front)); +#endif } void Splash::pop_front () { + +#ifdef __APPLE__ + if (get_window()) { + show (); + } +#else set_keep_above (true); +#endif } void |