on xenial help sign in
fix focusing issues
commit2d75060c2b54ed79ad6326615772a8fac38d4578 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 27 May 2015, 13:33 (11 years ago) parent3cea423
1 file changed+5−4
qml/Stages/DesktopStage.qml+5−4
qml/Stages/DesktopStage.qml+5−4
@@ -94,7 +94,6 @@ Rectangle {
9494 if (appDelegate.state === "minimized") {
9595 appDelegate.state = "normal"
9696 }
97− appDelegate.focusWindow();
9897 ApplicationManager.focusApplication(appId);
9998 }
10099 }
@@ -158,8 +157,10 @@ Rectangle {
158157 readonly property int minWidth: units.gu(10)
159158 readonly property int minHeight: units.gu(10)
160159
161− function focusWindow() {
162− ApplicationManager.requestFocusApplication(model.appId);
160+ onFocusChanged: {
161+ if (focus) {
162+ ApplicationManager.requestFocusApplication(model.appId);
163+ }
163164 }
164165
165166 states: [
@@ -276,7 +277,7 @@ Rectangle {
276277 property bool upperThirdContainsMouse: containsMouse && mouseY < height / 3
277278 onClicked: {
278279 print("clicked")
279− appDelegate.focusWindow()
280+ appDelegate.focus = true
280281 root.state = ""
281282 }
282283 }