make ArdourDialog and ArdourWindow call ::relay_key_press() which fixes the "not-toggleable-on-first-show" and other issues

This commit is contained in:
Paul Davis 2013-05-06 10:55:40 -04:00
parent ee426ca223
commit f96a5c2a95
4 changed files with 16 additions and 1 deletions

View file

@ -26,6 +26,7 @@
#include "ardour_ui.h" #include "ardour_ui.h"
#include "keyboard.h" #include "keyboard.h"
#include "splash.h" #include "splash.h"
#include "utils.h"
using namespace std; using namespace std;
using namespace Gtk; using namespace Gtk;
@ -58,6 +59,12 @@ ArdourDialog::~ArdourDialog ()
} }
} }
bool
ArdourDialog::on_key_press_event (GdkEventKey* ev)
{
return relay_key_press (ev, this);
}
bool bool
ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev) ArdourDialog::on_enter_notify_event (GdkEventCrossing *ev)
{ {

View file

@ -40,7 +40,8 @@ class ArdourDialog : public Gtk::Dialog, public ARDOUR::SessionHandlePtr
bool on_enter_notify_event (GdkEventCrossing*); bool on_enter_notify_event (GdkEventCrossing*);
bool on_leave_notify_event (GdkEventCrossing*); bool on_leave_notify_event (GdkEventCrossing*);
bool on_delete_event (GdkEventAny *); bool on_delete_event (GdkEventAny*);
bool on_key_press_event (GdkEventKey*);
void on_unmap (); void on_unmap ();
void on_show (); void on_show ();

View file

@ -53,6 +53,12 @@ ArdourWindow::~ArdourWindow ()
{ {
} }
bool
ArdourWindow::on_key_press_event (GdkEventKey* ev)
{
return relay_key_press (ev, this);
}
bool bool
ArdourWindow::on_enter_notify_event (GdkEventCrossing *ev) ArdourWindow::on_enter_notify_event (GdkEventCrossing *ev)
{ {

View file

@ -43,6 +43,7 @@ class ArdourWindow : public Gtk::Window, public ARDOUR::SessionHandlePtr, public
bool on_enter_notify_event (GdkEventCrossing*); bool on_enter_notify_event (GdkEventCrossing*);
bool on_leave_notify_event (GdkEventCrossing*); bool on_leave_notify_event (GdkEventCrossing*);
bool on_delete_event (GdkEventAny *); bool on_delete_event (GdkEventAny *);
bool on_key_press_event (GdkEventKey*);
void on_unmap (); void on_unmap ();
private: private: