mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-13 18:16:35 +01:00
Potential fix for AU window close crash.
This commit is contained in:
parent
a27e5e6cb8
commit
c94d352f56
2 changed files with 12 additions and 6 deletions
|
|
@ -89,11 +89,14 @@ void
|
||||||
ArdourDialog::on_unmap ()
|
ArdourDialog::on_unmap ()
|
||||||
{
|
{
|
||||||
if (Keyboard::some_magic_widget_has_focus()) {
|
if (Keyboard::some_magic_widget_has_focus()) {
|
||||||
|
Gtk::Widget* widget = get_focus();
|
||||||
|
if (widget) {
|
||||||
Gtk::Window* win = static_cast<Gtk::Window*>(get_focus()->get_toplevel());
|
Gtk::Window* win = static_cast<Gtk::Window*>(get_focus()->get_toplevel());
|
||||||
if (win == Keyboard::get_current_window()) {
|
if (win == Keyboard::get_current_window()) {
|
||||||
Keyboard::magic_widget_drop_focus ();
|
Keyboard::magic_widget_drop_focus ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Keyboard::the_keyboard().leave_window (0, this);
|
Keyboard::the_keyboard().leave_window (0, this);
|
||||||
Dialog::on_unmap ();
|
Dialog::on_unmap ();
|
||||||
|
|
|
||||||
|
|
@ -94,11 +94,14 @@ void
|
||||||
ArdourWindow::on_unmap ()
|
ArdourWindow::on_unmap ()
|
||||||
{
|
{
|
||||||
if (Keyboard::some_magic_widget_has_focus()) {
|
if (Keyboard::some_magic_widget_has_focus()) {
|
||||||
|
Gtk::Widget* widget = get_focus();
|
||||||
|
if (widget) {
|
||||||
Gtk::Window* win = static_cast<Gtk::Window*>(get_focus()->get_toplevel());
|
Gtk::Window* win = static_cast<Gtk::Window*>(get_focus()->get_toplevel());
|
||||||
if (win == Keyboard::get_current_window()) {
|
if (win == Keyboard::get_current_window()) {
|
||||||
Keyboard::magic_widget_drop_focus ();
|
Keyboard::magic_widget_drop_focus ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Keyboard::the_keyboard().leave_window (0, this);
|
Keyboard::the_keyboard().leave_window (0, this);
|
||||||
Window::on_unmap ();
|
Window::on_unmap ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue