possible fix for #2292

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3467 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-06-17 15:32:50 +00:00
parent 8c3fb5a1f8
commit 5e58d036af
5 changed files with 42 additions and 1 deletions

View File

@ -339,6 +339,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI
AudioClock big_clock;
Gtk::Window* big_clock_window;
void float_big_clock (Gtk::Window* parent);
bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
void update_transport_clocks (nframes_t pos);
void record_state_changed ();

View File

@ -408,3 +408,24 @@ ARDOUR_UI::handle_locations_change (Location* ignored)
}
}
}
bool
ARDOUR_UI::main_window_state_event_handler (GdkEventWindowState* ev, bool window_was_editor)
{
if (window_was_editor) {
if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) &&
(ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
float_big_clock (editor);
}
} else {
if ((ev->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) &&
(ev->new_window_state & GDK_WINDOW_STATE_FULLSCREEN)) {
float_big_clock (mixer);
}
}
return false;
}

View File

@ -30,6 +30,7 @@
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/window_title.h>
#include <gtk/gtk.h>
#include "ardour_ui.h"
#include "public_editor.h"
@ -73,6 +74,7 @@ ARDOUR_UI::create_editor ()
}
editor->Realized.connect (mem_fun (*this, &ARDOUR_UI::editor_realized));
editor->signal_window_state_event().connect (sigc::bind (mem_fun (*this, &ARDOUR_UI::main_window_state_event_handler), true));
return 0;
}
@ -856,3 +858,16 @@ ARDOUR_UI::setup_clock ()
manage_window (*big_clock_window);
}
void
ARDOUR_UI::float_big_clock (Gtk::Window* parent)
{
if (big_clock_window) {
if (parent) {
big_clock_window->set_transient_for (*parent);
} else {
gtk_window_set_transient_for (big_clock_window->gobj(), (GtkWindow*) 0);
}
}
}

View File

@ -41,6 +41,8 @@ ARDOUR_UI::create_mixer ()
return -1;
}
mixer->signal_window_state_event().connect (bind (mem_fun (*this, &ARDOUR_UI::main_window_state_event_handler), false));
return 0;
}

View File

@ -4006,8 +4006,8 @@ Editor::maximise_editing_space ()
post_maximal_pane_position = edit_pane.get_width();
}
fullscreen();
if(post_maximal_editor_width) {
edit_pane.set_position (post_maximal_pane_position -
abs(post_maximal_editor_width - pre_maximal_editor_width));