on xenial help sign in
refactor the dragging property exposure
c09b289Lukáš Tinkl
qml/Stages/DecoratedWindow.qml+1−1
@@ -54,7 +54,7 @@ FocusScope {
54 property alias overlayShown: decoration.overlayShown
54 property alias overlayShown: decoration.overlayShown
55 property alias stageWidth: moveHandler.stageWidth
55 property alias stageWidth: moveHandler.stageWidth
56 property alias stageHeight: moveHandler.stageHeight
56 property alias stageHeight: moveHandler.stageHeight
57− readonly property alias moveHandler: moveHandler
57+ readonly property alias dragging: moveHandler.dragging
58
58
59 signal closeClicked()
59 signal closeClicked()
60 signal maximizeClicked()
60 signal maximizeClicked()
qml/Stages/DesktopStage.qml+1−1
@@ -347,7 +347,7 @@ AbstractStage {
347 readonly property var surface: model.surface
347 readonly property var surface: model.surface
348 readonly property alias resizeArea: resizeArea
348 readonly property alias resizeArea: resizeArea
349 readonly property alias focusedSurface: decoratedWindow.focusedSurface
349 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
351
351
352 readonly property bool isDash: model.application.appId == "unity8-dash"
352 readonly property bool isDash: model.application.appId == "unity8-dash"
353
353
qml/Stages/WindowControlsOverlay.qml+3−2
@@ -32,7 +32,7 @@ Item {
32
32
33 // to be read from outside
33 // to be read from outside
34 readonly property alias overlayShown: overlay.visible
34 readonly property alias overlayShown: overlay.visible
35− readonly property alias moveHandler: moveHandler
35+ readonly property alias dragging: priv.dragging
36
36
37 signal fakeMaximizeAnimationRequested(real amount)
37 signal fakeMaximizeAnimationRequested(real amount)
38 signal fakeMaximizeLeftAnimationRequested(real amount)
38 signal fakeMaximizeLeftAnimationRequested(real amount)
@@ -85,13 +85,14 @@ Item {
85 Timer {
85 Timer {
86 id: overlayTimer
86 id: overlayTimer
87 interval: 2000
87 interval: 2000
88− repeat: moveHandler.dragging || (priv.resizeArea && priv.resizeArea.dragging)
88+ repeat: priv.dragging
89 }
89 }
90
90
91 QtObject {
91 QtObject {
92 id: priv
92 id: priv
93 readonly property var resizeArea: root.target && root.target.resizeArea ? root.target.resizeArea : null
93 readonly property var resizeArea: root.target && root.target.resizeArea ? root.target.resizeArea : null
94 readonly property bool ensureWindow: root.target.state == "normal" || root.target.state == "restored"
94 readonly property bool ensureWindow: root.target.state == "normal" || root.target.state == "restored"
95+ readonly property bool dragging: moveHandler.dragging || (resizeArea && resizeArea.dragging)
95
96
96 function getSensingPoints() {
97 function getSensingPoints() {
97 var xPoints = [];
98 var xPoints = [];