diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index ec5fe5c673..a1c3a58539 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -197,7 +197,6 @@ DragInfo::clear_copied_locations () copied_locations.clear (); } -#ifdef GTKOSX static void pane_size_watcher (Paned* pane) { @@ -208,7 +207,7 @@ pane_size_watcher (Paned* pane) ugh. */ - int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 25; + int max_width_of_lhs = GTK_WIDGET(pane->gobj())->allocation.width - 62; gint pos = pane->get_position (); @@ -216,7 +215,6 @@ pane_size_watcher (Paned* pane) pane->set_position (max_width_of_lhs); } } -#endif Editor::Editor () : @@ -747,10 +745,9 @@ Editor::Editor () edit_pane.pack2 (the_notebook, false, true); edit_pane.signal_size_allocate().connect (bind (mem_fun(*this, &Editor::pane_allocation_handler), static_cast (&edit_pane))); -#ifdef GTKOSX + Glib::PropertyProxy proxy = edit_pane.property_position(); proxy.signal_changed().connect (bind (sigc::ptr_fun (pane_size_watcher), static_cast (&edit_pane))); -#endif top_hbox.pack_start (toolbar_frame, true, true); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 8cb8dece9f..7339a4a8dd 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -59,6 +59,25 @@ using namespace std; using PBD::atoi; +static void +pane_size_watcher (Paned* pane) +{ + /* if the handle of a pane vanishes into (at least) the tabs of a notebook, + it is no longer accessible. so stop that. this doesn't happen on X11, + just the quartz backend. + + ugh. + */ + + gint pos = pane->get_position (); + + if (pos < 22) { + pane->set_position (22); + } +} + + + Mixer_UI::Mixer_UI () : Window (Gtk::WINDOW_TOPLEVEL) { @@ -218,6 +237,10 @@ Mixer_UI::Mixer_UI () static_cast (&rhs_pane1))); list_hpane.signal_size_allocate().connect (bind (mem_fun(*this, &Mixer_UI::pane_allocation_handler), static_cast (&list_hpane))); + + Glib::PropertyProxy proxy = list_hpane.property_position(); + proxy.signal_changed().connect (bind (sigc::ptr_fun (pane_size_watcher), static_cast (&list_hpane))); + global_vpacker.pack_start (list_hpane, true, true); diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 84482dd328..7fadf0e28a 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -485,7 +485,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) bool special_handling_of_unmodified_accelerators = false; bool allow_activating = true; -//#define DEBUG_ACCELERATOR_HANDLING +// #define DEBUG_ACCELERATOR_HANDLING #ifdef DEBUG_ACCELERATOR_HANDLING //bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0); bool debug=true; @@ -510,7 +510,8 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) if (debug) { cerr << "Win = " << win << " Key event: code = " << ev->keyval << " name = " << gdk_keyval_name (ev->keyval) << " state = " << hex << ev->state << dec << " ctrl " << ((ev->state & GDK_CONTROL_MASK) ? 1 : 0) - << " alt " << ((ev->state & GDK_MOD1_MASK) ? 1 : 0) + << " alt/mod1 " << ((ev->state & GDK_MOD1_MASK) ? 1 : 0) + << " mod2 " << ((ev->state & GDK_MOD2_MASK) ? 1 : 0) << " shift " << ((ev->state & GDK_SHIFT_MASK) ? 1 : 0) << " cmd/meta " << ((ev->state & GDK_META_MASK) ? 1 : 0) << " lock " << ((ev->state & GDK_LOCK_MASK) ? 1 : 0) @@ -568,7 +569,9 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) #ifdef DEBUG_ACCELERATOR_HANDLING cerr << "Remapped " << gdk_keyval_name (ev->keyval) << " to " << gdk_keyval_name (keyval_without_alt) << endl; -#endif ev->keyval = keyval_without_alt; +#endif + ev->keyval = keyval_without_alt; + ev->group = 0; } } }