on xenial help sign in
Don't close Drawer when apps close
7575e00Dalton Durst
qml/Launcher/Launcher.qml+9
@@ -117,6 +117,15 @@ FocusScope {
117 hint();
117 hint();
118 }
118 }
119
119
120+ // Switches the Launcher to the visible state, but only if it's not already
121+ // opened.
122+ // Prevents closing the Drawer when trying to show the Launcher.
123+ function show() {
124+ if (state === "" || state === "visibleTemporary") {
125+ switchToNextState("visible");
126+ }
127+ }
128+
120 function hide(flags) {
129 function hide(flags) {
121 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
130 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
122 if (state == "drawer") {
131 if (state == "drawer") {
qml/Shell.qml+1−1
@@ -135,7 +135,7 @@ StyledItem {
135 } else if (topLevelSurfaceList.count === 0 && !greeter.active && !wizard.active) {
135 } else if (topLevelSurfaceList.count === 0 && !greeter.active && !wizard.active) {
136 // Show the Launcher when there are no apps running
136 // Show the Launcher when there are no apps running
137 stage.closeSpread();
137 stage.closeSpread();
138− launcher.switchToNextState("visible")
138+ launcher.show();
139 }
139 }
140
140
141 // *Always* make sure the greeter knows that the focused app changed
141 // *Always* make sure the greeter knows that the focused app changed