diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-11-20 14:19:22 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:25 -0500 |
commit | a29fd4542e885cc8dff2e10ef5fc15912c6d4277 (patch) | |
tree | 7d3339c430941d3cf9d497d8de54422ba9641a80 /libs | |
parent | 64de2b415a7db1e2a89f47629de5e3f824d8ebec (diff) |
a bunch of stuff to make tab/window switching work better, and provide Alt-m to toggle between editor+mixer in a sane way
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/window_proxy.h | 4 | ||||
-rw-r--r-- | libs/gtkmm2ext/tabbable.cc | 7 | ||||
-rw-r--r-- | libs/gtkmm2ext/window_proxy.cc | 20 |
3 files changed, 24 insertions, 7 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/window_proxy.h b/libs/gtkmm2ext/gtkmm2ext/window_proxy.h index a7923e8e04..abacca2428 100644 --- a/libs/gtkmm2ext/gtkmm2ext/window_proxy.h +++ b/libs/gtkmm2ext/gtkmm2ext/window_proxy.h @@ -52,8 +52,8 @@ class LIBGTKMM2EXT_API WindowProxy : public PBD::StatefulDestructible, public vi void present (); void maybe_show (); - bool visible() const { return _visible; } - bool not_visible() const { return !_visible; } + bool visible() const; + bool fully_visible() const; const std::string& name() const { return _name; } const std::string& menu_name() const { return _menu_name; } diff --git a/libs/gtkmm2ext/tabbable.cc b/libs/gtkmm2ext/tabbable.cc index 1c720591f5..be898a5555 100644 --- a/libs/gtkmm2ext/tabbable.cc +++ b/libs/gtkmm2ext/tabbable.cc @@ -188,11 +188,8 @@ Tabbable::change_visibility () } if (_window && (current_toplevel() == _window)) { - if (_window->is_visible ()) { - _window->hide (); - } else { - _window->present (); - } + /* Use WindowProxy method which will rotate then hide */ + toggle(); } } diff --git a/libs/gtkmm2ext/window_proxy.cc b/libs/gtkmm2ext/window_proxy.cc index 8efebd0241..b40e373046 100644 --- a/libs/gtkmm2ext/window_proxy.cc +++ b/libs/gtkmm2ext/window_proxy.cc @@ -233,6 +233,26 @@ WindowProxy::setup () set_pos_and_size (); } +bool +WindowProxy::visible() const +{ + if (vistracker) { + /* update with current state */ + _visible = vistracker->partially_visible(); + } + return _visible; +} + +bool +WindowProxy::fully_visible () const +{ + if (!vistracker) { + /* no vistracker .. no window .. cannot be fully visible */ + return false; + } + return vistracker->fully_visible(); +} + void WindowProxy::show () { |