on xenial help sign in
refactor the dragging property exposure
commitc09b289ed12a0c3da93030b2b55b6406adf00e53 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 1 Sep 2016, 15:40 (10 years ago) parent5e6ca45
3 files changed+5−4
qml/Stages/DecoratedWindow.qml+1−1 qml/Stages/DesktopStage.qml+1−1 qml/Stages/WindowControlsOverlay.qml+3−2
qml/Stages/DecoratedWindow.qml+1−1
@@ -54,7 +54,7 @@ FocusScope {
5454 property alias overlayShown: decoration.overlayShown
5555 property alias stageWidth: moveHandler.stageWidth
5656 property alias stageHeight: moveHandler.stageHeight
57− readonly property alias moveHandler: moveHandler
57+ readonly property alias dragging: moveHandler.dragging
5858
5959 signal closeClicked()
6060 signal maximizeClicked()
qml/Stages/DesktopStage.qml+1−1
@@ -347,7 +347,7 @@ AbstractStage {
347347 readonly property var surface: model.surface
348348 readonly property alias resizeArea: resizeArea
349349 readonly property alias focusedSurface: decoratedWindow.focusedSurface
350− readonly property bool dragging: touchControls.overlayShown ? touchControls.moveHandler.dragging : decoratedWindow.moveHandler.dragging
350+ readonly property bool dragging: touchControls.overlayShown ? touchControls.dragging : decoratedWindow.dragging
351351
352352 readonly property bool isDash: model.application.appId == "unity8-dash"
353353
qml/Stages/WindowControlsOverlay.qml+3−2
@@ -32,7 +32,7 @@ Item {
3232
3333 // to be read from outside
3434 readonly property alias overlayShown: overlay.visible
35− readonly property alias moveHandler: moveHandler
35+ readonly property alias dragging: priv.dragging
3636
3737 signal fakeMaximizeAnimationRequested(real amount)
3838 signal fakeMaximizeLeftAnimationRequested(real amount)
@@ -85,13 +85,14 @@ Item {
8585 Timer {
8686 id: overlayTimer
8787 interval: 2000
88− repeat: moveHandler.dragging || (priv.resizeArea && priv.resizeArea.dragging)
88+ repeat: priv.dragging
8989 }
9090
9191 QtObject {
9292 id: priv
9393 readonly property var resizeArea: root.target && root.target.resizeArea ? root.target.resizeArea : null
9494 readonly property bool ensureWindow: root.target.state == "normal" || root.target.state == "restored"
95+ readonly property bool dragging: moveHandler.dragging || (resizeArea && resizeArea.dragging)
9596
9697 function getSensingPoints() {
9798 var xPoints = [];