[Summary] Added grab focus action when panner or fader is pressed.

This commit is contained in:
GZharun 2014-09-19 14:15:42 +03:00
parent d67e1a0f1e
commit 12e885ef83
2 changed files with 5 additions and 1 deletions

View file

@ -127,6 +127,8 @@ PannerInterface::value_change ()
bool
PannerInterface::on_button_press_event (GdkEventButton* ev)
{
grab_focus();
if (Gtkmm2ext::Keyboard::is_edit_event (ev)) {
edit ();
return true;

View file

@ -255,10 +255,12 @@ Fader::on_size_allocate (Gtk::Allocation& alloc)
bool
Fader::on_button_press_event (GdkEventButton* ev)
{
grab_focus();
if (_read_only) {
return false;
}
if (ev->type != GDK_BUTTON_PRESS) {
return true;
}