From 260c082c4efb3b58202b278c1050dae95c17a7c2 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sun, 3 Mar 2013 21:58:37 -0500 Subject: [PATCH] main: defer session update until startup animation We currently call the session updated handler as soon as the session modes are read. This handler sets up keybindings for leaving the overview (if a user session) and shows the login dialog (if a gdm session). We can't do the latter until the stage is mapped because it takes a grab, and we don't need to do the former until the user goes into the overview. This commit defers processing session updates until the the layout manager says start up is prepared. It fixes a race condition at login screen startup now that we don't show the stage right away. https://bugzilla.gnome.org/show_bug.cgi?id=694321 --- js/ui/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/ui/main.js b/js/ui/main.js index a2761624c..df4030035 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -159,8 +159,6 @@ function startSession() { global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT, false, -1, 1); global.display.connect('overlay-key', Lang.bind(overview, overview.toggle)); - sessionMode.connect('updated', _sessionUpdated); - _sessionUpdated(); // Provide the bus object for gnome-session to // initiate logouts. @@ -201,6 +199,9 @@ function startSession() { if (keybindingMode == Shell.KeyBindingMode.NONE) { keybindingMode = Shell.KeyBindingMode.NORMAL; } + + sessionMode.connect('updated', _sessionUpdated); + _sessionUpdated(); }); }