on xenial help sign in
simplify
commit4b9dc7506cc553f695abc199cf13f64e856b120f authorLukáš Tinkl <lukas.tinkl@canonical.com> dateFri 24 Feb 2017, 12:59 (10 years ago) parent0e142de
1 file changed+5−10
qml/Stage/Stage.qml+5−10
qml/Stage/Stage.qml+5−10
@@ -949,15 +949,10 @@ FocusScope {
949949 readonly property bool windowReady: clientAreaItem.surfaceInitialized
950950 property int requestedWindowState: Mir.RestoredState
951951 onWindowReadyChanged: {
952− if (windowReady) {
953− // Now load any saved state. This needs to happen *after* the cascading!
954− if (root.mode == "windowed") {
955− var ws = requestedWindowState;
956−
957− // need to apply the windowed shell chrome policy on top the saved window state
958− ws = windowedFullscreenPolicy.applyPolicy(ws, surface.shellChrome);
959− window.requestState(ws);
960− }
952+ if (windowReady && root.mode == "windowed") {
953+ // need to apply the windowed shell chrome policy on top the saved window state
954+ requestedWindowState = windowedFullscreenPolicy.applyPolicy(requestedWindowState, surface.shellChrome);
955+ window.requestState(requestedWindowState);
961956 }
962957 }
963958
@@ -971,7 +966,7 @@ FocusScope {
971966 // First, cascade the newly created window, relative to the currently/old focused window.
972967 windowedX = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedX + units.gu(3) : (normalZ - 1) * units.gu(3)
973968 windowedY = priv.focusedAppDelegate ? priv.focusedAppDelegate.windowedY + units.gu(3) : normalZ * units.gu(3)
974−
969+ // Now load any saved state. This needs to happen *after* the cascading!
975970 requestedWindowState = WindowStateStorage.toMirState(windowStateSaver.load());
976971
977972 updateQmlFocusFromMirSurfaceFocus();