From 2b662dd993c1cce712148765c953dfaf92390a01 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Jun 2008 19:58:15 +0000 Subject: Fix Ctrl 'editable' patch modifier (for control twiddling) ceasing to work in various scenarios (ticket #120). git-svn-id: http://svn.drobilla.net/lad/ingen@1259 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/PatchWindow.cpp | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'src/libs/gui/PatchWindow.cpp') diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp index 84c60fc9..865cc9eb 100644 --- a/src/libs/gui/PatchWindow.cpp +++ b/src/libs/gui/PatchWindow.cpp @@ -419,17 +419,31 @@ PatchWindow::on_hide() bool PatchWindow::on_key_press_event(GdkEventKey* event) { - if (event->keyval == GDK_Delete) { - if (_view) { - _view->canvas()->destroy_selection(); - } - return true; - } else { - return Gtk::Window::on_key_press_event(event); - } + bool ret = false; + + ret = _view->canvas()->canvas_key_event(event); + + if (!ret) + ret = Gtk::Window::on_key_press_event(event); + + return ret; } + +bool +PatchWindow::on_key_release_event(GdkEventKey* event) +{ + bool ret = false; + + ret = _view->canvas()->canvas_key_event(event); + + if (!ret) + ret = Gtk::Window::on_key_release_event(event); + + return ret; +} + void PatchWindow::event_quit() { -- cgit v1.2.1