x11-display: Split out restoring of active workspace

Splitting out the X11 display initialization from display_open() broke
restoring the previously active workspace in two ways:

 - when dynamic workspaces are used, the old workspaces haven't
   been restored yet, so we stay on the first workspace

 - when static workspaces are used, the code tries to access
   the compositor that hasn't been initialized yet, resulting
   in a segfault

Fix both those issues by splitting out restoring of the active workspace.

https://gitlab.gnome.org/GNOME/mutter/issues/479
This commit is contained in:
Florian Müllner
2019-03-01 12:03:46 +01:00
committed by Florian Müllner
parent 3e472faf5c
commit 7abceb434d
3 changed files with 43 additions and 26 deletions

View File

@ -751,7 +751,10 @@ meta_display_open (void)
enable_compositor (display);
if (display->x11_display)
meta_x11_display_create_guard_window (display->x11_display);
{
meta_x11_display_restore_active_workspace (display->x11_display);
meta_x11_display_create_guard_window (display->x11_display);
}
/* Set up touch support */
display->gesture_tracker = meta_gesture_tracker_new ();