mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
core: Be more selective looking for a focusable ancestor
find_focusable_ancestor() may pick an ancestor window which is not mapped or hidden, and setting focus on that window will fail. Be a tad more selective when looking for a focusable ancestor, to reduce the chance of meta_window_focus() not focusing the happy chosen one. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1643>
This commit is contained in:
parent
afa431547b
commit
76d1a64204
@ -1346,7 +1346,10 @@ find_focusable_ancestor (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
MetaWorkspaceFocusableAncestorData *data = user_data;
|
MetaWorkspaceFocusableAncestorData *data = user_data;
|
||||||
|
|
||||||
if (!window->unmanaging && meta_window_is_focusable (window) &&
|
if (!window->unmanaging &&
|
||||||
|
window->mapped &&
|
||||||
|
!window->hidden &&
|
||||||
|
meta_window_is_focusable (window) &&
|
||||||
meta_window_located_on_workspace (window, data->workspace) &&
|
meta_window_located_on_workspace (window, data->workspace) &&
|
||||||
meta_window_showing_on_its_workspace (window))
|
meta_window_showing_on_its_workspace (window))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user