screen: Split workspace initialization from meta_screen_new()

Since commit 8b2b65246a, we assume that the compositor always
exists. Alas, the assumption is wrong - the compositor is currently
initialized after the screen, but meta_screen_new() itself may
call a compositor function if initialization involves a workspace
switch (which will happen when meta_workspace_activate() is called
more than once and for different workspaces - or in other words,
when _NET_CURRENT_DESKTOP is set and not 0).
So carefully split out the offending bits and only call them after
the compositor has been initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=731332
This commit is contained in:
Florian Müllner
2014-06-05 22:28:56 +02:00
parent d7e99a3f86
commit 8100cefd4c
3 changed files with 37 additions and 27 deletions

View File

@ -805,6 +805,7 @@ meta_display_open (void)
enable_compositor (the_display);
meta_screen_init_workspaces (screen);
meta_screen_create_guard_window (screen);
/* We know that if mutter is running as a Wayland compositor,