Don't close Drawer when apps close
commit7575e000681823dd0e980ef3bb4c9b3c0ea5ff71
authorDalton Durst <dalton@ubports.com>
dateThu 11 Jul 2019, 12:09 (7 years ago)
parentb4a5012
qml/Launcher/Launcher.qml+9
@@ -117,6 +117,15 @@ FocusScope {
117117 hint();
118118 }
119119
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+
120129 function hide(flags) {
121130 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
122131 if (state == "drawer") {
qml/Shell.qml+1−1
@@ -135,7 +135,7 @@ StyledItem {
135135 } else if (topLevelSurfaceList.count === 0 && !greeter.active && !wizard.active) {
136136 // Show the Launcher when there are no apps running
137137 stage.closeSpread();
138− launcher.switchToNextState("visible")
138+ launcher.show();
139139 }
140140
141141 // *Always* make sure the greeter knows that the focused app changed