summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-24 03:14:33 +0000
committerDavid Robillard <d@drobilla.net>2012-04-24 03:14:33 +0000
commit717da45334185e4aa920baf398150d9c8cfa5c5c (patch)
treeb8b3dcce1832e5638582c7f48c8500a8de6bdec8 /src/gui/PatchWindow.cpp
parent5a8d5ca92b60a760fbff8be5d8bbda0e616798cc (diff)
downloadingen-717da45334185e4aa920baf398150d9c8cfa5c5c.tar.gz
ingen-717da45334185e4aa920baf398150d9c8cfa5c5c.tar.bz2
ingen-717da45334185e4aa920baf398150d9c8cfa5c5c.zip
Give canvas focus by default so keyboard commands work.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4261 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchWindow.cpp')
-rw-r--r--src/gui/PatchWindow.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index 526b7fec..0ee60760 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -62,6 +62,8 @@ PatchWindow::on_show()
move(_x, _y);
Gtk::Window::on_show();
+
+ _box->view()->canvas()->widget().grab_focus();
}
void
@@ -72,16 +74,5 @@ PatchWindow::on_hide()
Gtk::Window::on_hide();
}
-bool
-PatchWindow::on_event(GdkEvent* event)
-{
- if ((event->type == GDK_KEY_PRESS || event->type == GDK_KEY_RELEASE)
- && box()->view()->canvas()->on_event(event)) {
- return true;
- } else {
- return Gtk::Window::on_event(event);
- }
-}
-
} // namespace GUI
} // namespace Ingen