summaryrefslogtreecommitdiffstats
path: root/src/gui/Window.hpp
diff options
context:
space:
mode:
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;