From 98d77d37d061a4da7653bb30a11b4f326b3d2a18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 30 Sep 2017 00:38:37 +0200 Subject: [PATCH] screen: Make sure to initialize NUMBER_OF_DESKTOPS update_num_workspaces() is a no-op when the number of workspaces did not actually change. That is fine, except that we still want to initialize the _NET_NUMBER_OF_DESKTOPS hint on startup to not break components like nautilus-desktop that rely on it. https://bugzilla.gnome.org/show_bug.cgi?id=760651 --- src/core/screen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/screen.c b/src/core/screen.c index c96aefd7f..abc133d26 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -1215,7 +1215,11 @@ update_num_workspaces (MetaScreen *screen, g_assert (new_num > 0); if (g_list_length (screen->workspaces) == (guint) new_num) - return; + { + if (screen->display->display_opening) + set_number_of_spaces_hint (screen, new_num); + return; + } last_remaining = NULL; extras = NULL;