window: Add is_focusable class method

Implement is_focusable for both x11 and wayland and just use this check
so that we can abstract things more and be less dependent on window backend.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/421
This commit is contained in:
Marco Trevisan (Treviño)
2018-11-13 08:56:53 +01:00
committed by Marco Trevisan
parent fdd531f307
commit 43633d6b2f
5 changed files with 30 additions and 8 deletions

View File

@ -1224,10 +1224,7 @@ get_default_focus_window (MetaStack *stack,
if (window->unmaps_pending > 0)
continue;
if (window->unmanaging)
continue;
if (!(window->input || window->take_focus))
if (!meta_window_is_focusable (window))
continue;
if (!meta_window_should_be_showing (window))