summaryrefslogtreecommitdiffstats
path: root/src/gui/Window.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-14 08:38:35 +0000
committerDavid Robillard <d@drobilla.net>2015-02-14 08:38:35 +0000
commiteeb89077546d256fdda2e3c3a5c49b7990dc13e9 (patch)
tree7a031c805eca5c11355d67182d1bb4642126d52d /src/gui/Window.hpp
parent1115a7820a7a9dda9d2042c39ad5b7bb10919f86 (diff)
downloadingen-eeb89077546d256fdda2e3c3a5c49b7990dc13e9.tar.gz
ingen-eeb89077546d256fdda2e3c3a5c49b7990dc13e9.tar.bz2
ingen-eeb89077546d256fdda2e3c3a5c49b7990dc13e9.zip
Fix quit via window close.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5565 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Window.hpp')
-rw-r--r--src/gui/Window.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/Window.hpp b/src/gui/Window.hpp
index ca1d8828..386cb75b 100644
--- a/src/gui/Window.hpp
+++ b/src/gui/Window.hpp
@@ -38,10 +38,11 @@ public:
virtual void init_window(App& app) { _app = &app; }
bool on_key_press_event(GdkEventKey* event) {
- if (Ingen::GUI::Window::key_press_handler(this, event))
+ if (event->keyval == GDK_w && event->state & GDK_CONTROL_MASK) {
+ hide();
return true;
- else
- return Gtk::Window::on_key_press_event(event);
+ }
+ return Gtk::Window::on_key_press_event(event);
}
static bool key_press_handler(Gtk::Window* win, GdkEventKey* event);
@@ -61,10 +62,11 @@ public:
virtual void init_dialog(App& app) { _app = &app; }
bool on_key_press_event(GdkEventKey* event) {
- if (Ingen::GUI::Window::key_press_handler(this, event))
+ if (event->keyval == GDK_w && event->state & GDK_CONTROL_MASK) {
+ hide();
return true;
- else
- return Gtk::Dialog::on_key_press_event(event);
+ }
+ return Gtk::Window::on_key_press_event(event);
}
App* _app;