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