X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fpanner_interface.cc;h=e0dfb359196974ad784642ffd3cd15b53985387e;hb=ae0dcdc0c5d13483271065c360e378202d20170a;hp=0fcba4cd1c6ef5c4c2d1ce4fa691bdc83c5fdfdc;hpb=ad017365f7a73f8ba57f667cc1aa36478b48c50e;p=ardour.git diff --git a/gtk2_ardour/panner_interface.cc b/gtk2_ardour/panner_interface.cc index 0fcba4cd1c..e0dfb35919 100644 --- a/gtk2_ardour/panner_interface.cc +++ b/gtk2_ardour/panner_interface.cc @@ -20,11 +20,13 @@ #include #include "gtkmm2ext/keyboard.h" #include "gtkmm2ext/persistent_tooltip.h" + +#include "pbd/controllable.h" + #include "panner_interface.h" #include "panner_editor.h" -#include "global_signals.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace Gtk; @@ -37,13 +39,13 @@ PannerInterface::PannerInterface (boost::shared_ptr p) , _send_mode (false) , _editor (0) { - set_flags (Gtk::CAN_FOCUS); + set_flags (Gtk::CAN_FOCUS); - add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK| - Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK| - Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK| - Gdk::SCROLL_MASK| - Gdk::POINTER_MOTION_MASK); + add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK| + Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK| + Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK| + Gdk::SCROLL_MASK| + Gdk::POINTER_MOTION_MASK); } @@ -57,6 +59,10 @@ PannerInterface::on_enter_notify_event (GdkEventCrossing *) { grab_focus (); Keyboard::magic_widget_grab_focus (); + + if (!proxy_controllable ().expired ()) { + PBD::Controllable::GUIFocusChanged (proxy_controllable ()); + } return false; } @@ -64,6 +70,9 @@ bool PannerInterface::on_leave_notify_event (GdkEventCrossing *) { Keyboard::magic_widget_drop_focus (); + if (!proxy_controllable ().expired ()) { + PBD::Controllable::GUIFocusChanged (boost::weak_ptr ()); + } return false; } @@ -119,7 +128,7 @@ PannerInterface::set_send_drawing_mode(bool onoff) { } PannerPersistentTooltip::PannerPersistentTooltip (Gtk::Widget* w) - : PersistentTooltip (w) + : PersistentTooltip (w, true) , _dragging (false) {