fix loss of Keyboard::current_window tracking when leaving a dialog by clicking a button
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4191 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6e78630e5a
commit
c2cc784829
|
@ -76,6 +76,7 @@ ArdourDialog::on_leave_notify_event (GdkEventCrossing *ev)
|
|||
void
|
||||
ArdourDialog::on_unmap ()
|
||||
{
|
||||
Keyboard::the_keyboard().leave_window (0, this);
|
||||
Dialog::on_unmap ();
|
||||
}
|
||||
|
||||
|
|
|
@ -301,6 +301,7 @@ Keyboard::enter_window (GdkEventCrossing *ev, Gtk::Window* win)
|
|||
bool
|
||||
Keyboard::leave_window (GdkEventCrossing *ev, Gtk::Window* win)
|
||||
{
|
||||
if (ev) {
|
||||
switch (ev->detail) {
|
||||
case GDK_NOTIFY_INFERIOR:
|
||||
if (debug_keyboard) {
|
||||
|
@ -322,6 +323,9 @@ Keyboard::leave_window (GdkEventCrossing *ev, Gtk::Window* win)
|
|||
state.clear ();
|
||||
current_window = 0;
|
||||
}
|
||||
} else {
|
||||
current_window = 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue