on xenial help sign in
hide drawer when activating something from the launcher
3a240aeMichael Zanetti
qml/Launcher/Launcher.qml+3
@@ -114,6 +114,9 @@ FocusScope {
114
114
115 function hide(flags) {
115 function hide(flags) {
116 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
116 if ((flags & ignoreHideIfMouseOverLauncher) && Utils.Functions.itemUnderMouse(panel)) {
117+ if (state == "drawer") {
118+ switchToNextState("visibleTemporary");
119+ }
117 return;
120 return;
118 }
121 }
119 switchToNextState("")
122 switchToNextState("")
tests/qmltests/Launcher/tst_Drawer.qml+17
@@ -311,5 +311,22 @@ StyledItem {
311
311
312 compare(launcher.lastSelectedApplication, "calendar-app");
312 compare(launcher.lastSelectedApplication, "calendar-app");
313 }
313 }
314+
315+ function test_focusAppFromLauncherWhileDrawerIsOpen() {
316+ // FIXME: Skipping this test because of a bug in Qt. Please enable
317+ // once https://codereview.qt-project.org/#/c/184942/ is accepted
318+ skip();
319+
320+ launcher.openDrawer(true);
321+ waitForRendering(launcher);
322+ waitUntilTransitionsEnd(launcher);
323+
324+ var appIcon = findChild(launcher, "launcherDelegate4")
325+
326+ mouseMove(launcher, units.gu(4), launcher.height / 2)
327+ mouseClick(appIcon, appIcon.width / 2, appIcon.height / 2);
328+
329+ tryCompare(launcher, "state", "visibleTemporary");
330+ }
314 }
331 }
315}
332}