on xenial help sign in
fix switching focus between apps
commitb2a69e2d4d537f8e370ca7e37d8b8c3c12acf98c authorLukáš Tinkl <lukas.tinkl@canonical.com> dateWed 30 Mar 2016, 22:17 (11 years ago) parent6170848
2 files changed+8−2
qml/Stages/DesktopStage.qml+1 qml/Stages/WindowControlsOverlay.qml+7−2
qml/Stages/DesktopStage.qml+1
@@ -549,6 +549,7 @@ AbstractStage {
549549 target: appDelegate
550550 resizeTarget: resizeArea
551551 borderThickness: resizeArea.borderThickness
552+ onActivated: ApplicationManager.focusApplication(model.appId)
552553 }
553554
554555 WindowedFullscreenPolicy {
qml/Stages/WindowControlsOverlay.qml+7−2
@@ -26,6 +26,8 @@ Item {
2626 property Item resizeTarget // WindowResizeArea
2727 property int borderThickness
2828
29+ signal activated
30+
2931 TabletSideStageTouchGesture {
3032 id: gestureArea
3133 anchors.fill: parent
@@ -33,8 +35,9 @@ Item {
3335 maximumTouchPoints: 2
3436
3537 onRecognisedPressChanged: {
36− if (recognisedPress) {
38+ if (recognisedPress && target && !target.fullscreen) {
3739 overlayTimer.running = true;
40+ root.activated();
3841 }
3942 }
4043 }
@@ -51,6 +54,8 @@ Item {
5154 // dismiss area
5255 InverseMouseArea {
5356 anchors.fill: overlay
57+ visible: overlay.visible
58+ enabled: visible
5459 onClicked: overlayTimer.stop()
5560 }
5661
@@ -95,7 +100,7 @@ Item {
95100 Item {
96101 id: overlay
97102 anchors.fill: parent
98− opacity: overlayTimer.running && target && !target.fullscreen ? 1 : 0
103+ opacity: overlayTimer.running ? 1 : 0
99104 visible: opacity == 1
100105 enabled: visible
101106