Blame SOURCES/0001-workspace-Downgrade-assert-to-warning-when-adding-wi.patch

15745d
From d33a244603d1dd63e2e25255af98f489c65645f6 Mon Sep 17 00:00:00 2001
15745d
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
15745d
Date: Mon, 29 Aug 2022 16:01:48 +0200
15745d
Subject: [PATCH] workspace: Downgrade assert to warning when adding window
15745d
15745d
An extension can by accident cause us to end up in a state where we try
15745d
to add the same window to a workspace twice. When this happens we
15745d
shouldn't crash, but instead complain loudly.
15745d
15745d
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/992
15745d
Related: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/157
15745d
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1692>
15745d
---
15745d
 src/core/workspace.c | 3 ++-
15745d
 1 file changed, 2 insertions(+), 1 deletion(-)
15745d
15745d
diff --git a/src/core/workspace.c b/src/core/workspace.c
15745d
index 58fcfa78c5..ed16a83098 100644
15745d
--- a/src/core/workspace.c
15745d
+++ b/src/core/workspace.c
15745d
@@ -370,7 +370,8 @@ void
15745d
 meta_workspace_add_window (MetaWorkspace *workspace,
15745d
                            MetaWindow    *window)
15745d
 {
15745d
-  g_assert (g_list_find (workspace->mru_list, window) == NULL);
15745d
+  g_return_if_fail (g_list_find (workspace->mru_list, window) == NULL);
15745d
+
15745d
   workspace->mru_list = g_list_prepend (workspace->mru_list, window);
15745d
 
15745d
   workspace->windows = g_list_prepend (workspace->windows, window);
15745d
-- 
15745d
2.37.1
15745d