[gnome-shell] shell/app: Do not try to activate OR windows
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] shell/app: Do not try to activate OR windows
- Date: Thu, 27 Jan 2022 14:25:37 +0000 (UTC)
commit f9037f5889801c80d15ee3dc45c9a9f8cc57feba
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jan 26 16:48:55 2022 +0100
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>
src/shell-app.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index a3215db59e..863f4db9d7 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -423,8 +423,19 @@ shell_app_activate_window (ShellApp *app,
return;
windows = shell_app_get_windows (app);
- if (window == NULL && windows)
- window = windows->data;
+ if (window == NULL)
+ {
+ 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))
return;
@@ -453,7 +464,9 @@ shell_app_activate_window (ShellApp *app,
{
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);
}
g_slist_free (windows_reversed);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]