window: Return focusable ability looking at properties only

As per commit 43633d6b, we mark an unmanaging window as not focusable, while
this is true, it might cause not resetting the current focused window when
unmanaging it causing a crash.

Also this wouldn't allow to check if a window can be focused when unmanaging it,
so let's revert the previous behavior.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/462
This commit is contained in:
Marco Trevisan (Treviño) 2019-02-14 13:47:52 +01:00
parent 9e2ed4104d
commit 58d2a674c4
2 changed files with 3 additions and 3 deletions

View File

@ -1224,6 +1224,9 @@ get_default_focus_window (MetaStack *stack,
if (window->unmaps_pending > 0)
continue;
if (window->unmanaging)
continue;
if (!meta_window_is_focusable (window))
continue;

View File

@ -8529,9 +8529,6 @@ meta_window_shortcuts_inhibited (MetaWindow *window,
gboolean
meta_window_is_focusable (MetaWindow *window)
{
if (window->unmanaging)
return FALSE;
return META_WINDOW_GET_CLASS (window)->is_focusable (window);
}