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
This commit is contained in:
Andrea Azzarone 2017-09-06 14:34:35 +02:00 committed by Marco Trevisan (Treviño)
parent f0c6c4eb1f
commit 8532b10290

View File

@ -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);