make ctrl-w shortcut operate on plugin editors

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3477 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-06-18 19:29:19 +00:00
parent 6446d0ce49
commit 35b0a000c3
2 changed files with 19 additions and 0 deletions

View File

@ -51,6 +51,7 @@
#include "utils.h"
#include "gui_thread.h"
#include "public_editor.h"
#include "keyboard.h"
#include "i18n.h"
@ -147,6 +148,20 @@ PluginUIWindow::on_map ()
set_keep_above (true);
}
bool
PluginUIWindow::on_enter_notify_event (GdkEventCrossing *ev)
{
Keyboard::the_keyboard().enter_window (ev, this);
return false;
}
bool
PluginUIWindow::on_leave_notify_event (GdkEventCrossing *ev)
{
Keyboard::the_keyboard().leave_window (ev, this);
return false;
}
void
PluginUIWindow::on_show ()
{

View File

@ -210,11 +210,15 @@ class PluginUIWindow : public Gtk::Window
void resize_preferred();
void set_parent (Gtk::Window*);
bool on_enter_notify_event (GdkEventCrossing*);
bool on_leave_notify_event (GdkEventCrossing*);
bool on_key_press_event (GdkEventKey*);
bool on_key_release_event (GdkEventKey*);
void on_show ();
void on_hide ();
void on_map ();
private:
PlugUIBase* _pluginui;
Gtk::Window* parent;