shell/app: Do not try to activate OR windows
Since https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2029, we track all windows, including OR ones. While this means that we can now assume that any window can be matched to an app, it also means we have to be more careful to not perform an unsupported action like focus or raise on an OR window. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4973 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2131>
This commit is contained in:
parent
6f025822ba
commit
f9037f5889
@ -423,8 +423,19 @@ shell_app_activate_window (ShellApp *app,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
windows = shell_app_get_windows (app);
|
windows = shell_app_get_windows (app);
|
||||||
if (window == NULL && windows)
|
if (window == NULL)
|
||||||
window = windows->data;
|
{
|
||||||
|
for (GSList *l = windows; l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaWindow *current_window = l->data;
|
||||||
|
|
||||||
|
if (!meta_window_is_override_redirect (current_window))
|
||||||
|
{
|
||||||
|
window = current_window;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!g_slist_find (windows, window))
|
if (!g_slist_find (windows, window))
|
||||||
return;
|
return;
|
||||||
@ -453,7 +464,9 @@ shell_app_activate_window (ShellApp *app,
|
|||||||
{
|
{
|
||||||
MetaWindow *other_window = iter->data;
|
MetaWindow *other_window = iter->data;
|
||||||
|
|
||||||
if (other_window != window && meta_window_get_workspace (other_window) == workspace)
|
if (other_window != window &&
|
||||||
|
!meta_window_is_override_redirect (other_window) &&
|
||||||
|
meta_window_get_workspace (other_window) == workspace)
|
||||||
meta_window_raise (other_window);
|
meta_window_raise (other_window);
|
||||||
}
|
}
|
||||||
g_slist_free (windows_reversed);
|
g_slist_free (windows_reversed);
|
||||||
|
Loading…
Reference in New Issue
Block a user