mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-07 06:05:43 +01:00
Merge branch 'master' into cairocanvas
This commit is contained in:
commit
54bf06e63c
13 changed files with 224 additions and 20 deletions
|
|
@ -35,6 +35,10 @@ class VisibilityTracker {
|
|||
|
||||
void cycle_visibility ();
|
||||
|
||||
bool fully_visible() const;
|
||||
bool not_visible() const;
|
||||
bool partially_visible() const;
|
||||
|
||||
private:
|
||||
Gtk::Window& window;
|
||||
GdkVisibilityState _visibility;
|
||||
|
|
|
|||
|
|
@ -41,10 +41,27 @@ VisibilityTracker::handle_visibility_notify_event (GdkEventVisibility* ev)
|
|||
void
|
||||
VisibilityTracker::cycle_visibility ()
|
||||
{
|
||||
if (window.is_mapped() && (_visibility == GDK_VISIBILITY_UNOBSCURED)) {
|
||||
if (fully_visible ()) {
|
||||
window.hide ();
|
||||
} else {
|
||||
window.present ();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
VisibilityTracker::fully_visible () const
|
||||
{
|
||||
return window.is_mapped() && (_visibility == GDK_VISIBILITY_UNOBSCURED);
|
||||
}
|
||||
|
||||
bool
|
||||
VisibilityTracker::not_visible () const
|
||||
{
|
||||
return !window.is_mapped() || (_visibility == GDK_VISIBILITY_FULLY_OBSCURED);
|
||||
}
|
||||
|
||||
bool
|
||||
VisibilityTracker::partially_visible () const
|
||||
{
|
||||
return window.is_mapped() && (_visibility == GDK_VISIBILITY_PARTIAL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue