[mutter] src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new



commit 8532b102909e09e1e0fdbd7f2701a7c40de1af5f
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Wed Sep 6 14:34:35 2017 +0200

    src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new
    
    Make sure to call set_number_of_spaces_hint in meta_screen_new.
    _NET_NUMBER_OF_DESKTOPS is required by nautilus-desktop to correctly
    get the desktop workarea.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760651

 src/core/screen.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index 98c5538..99ab5d7 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -72,6 +72,8 @@ static void prefs_changed_callback (MetaPreference pref,
 
 static void set_desktop_geometry_hint (MetaScreen *screen);
 static void set_desktop_viewport_hint (MetaScreen *screen);
+static void set_number_of_spaces_hint (MetaScreen *screen,
+                                       int         n_spaces);
 
 static void on_monitors_changed (MetaMonitorManager *manager,
                                  MetaScreen         *screen);
@@ -771,6 +773,7 @@ meta_screen_new (MetaDisplay *display,
    * so create that required workspace.
    */
   meta_workspace_new (screen);
+  set_number_of_spaces_hint (screen, g_list_length (screen->workspaces));
 
   screen->keys_grabbed = FALSE;
   meta_screen_grab_keys (screen);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]