on xenial help sign in
fix focus issue after launching something from drawer
55c26c2Michael Zanetti
qml/Launcher/Launcher.qml+2−1
@@ -349,8 +349,9 @@ FocusScope {
349 visible: x > -width
349 visible: x > -width
350
350
351 onApplicationSelected: {
351 onApplicationSelected: {
352− root.launcherApplicationSelected(appId)
353 root.hide();
352 root.hide();
353+ root.launcherApplicationSelected(appId)
354+ root.focus = false;
354 }
355 }
355
356
356 Keys.onEscapePressed: {
357 Keys.onEscapePressed: {
tests/qmltests/Launcher/tst_Drawer.qml+12
@@ -188,5 +188,17 @@ StyledItem {
188
188
189 tryCompare(launcher, "state", "");
189 tryCompare(launcher, "state", "");
190 }
190 }
191+
192+ function test_launcherGivesUpFocusAfterLaunchingFromDrawer() {
193+ dragDrawerIntoView();
194+
195+ tryCompare(launcher, "focus", true);
196+
197+ var drawerList = findChild(launcher, "drawerItemList");
198+ var dialerApp = findChild(drawerList, "drawerItem_dialer-app");
199+ mouseClick(dialerApp, dialerApp.width / 2, dialerApp.height / 2);
200+
201+ tryCompare(launcher, "focus", false);
202+ }
191 }
203 }
192}
204}