on xenial help sign in
bring back the drag to close
6946049Michael Zanetti
qml/Stages/DesktopStage.qml+12−7
@@ -756,6 +756,7 @@ AbstractStage {
756 hasDecoration: root.mode === "windowed"
756 hasDecoration: root.mode === "windowed"
757 shadowOpacity: spreadMaths.shadowOpacity
757 shadowOpacity: spreadMaths.shadowOpacity
758 showHighlight: spreadItem.highlightedIndex === index
758 showHighlight: spreadItem.highlightedIndex === index
759+ anchors.topMargin: dragArea.distance
759 }
760 }
760 PropertyChanges {
761 PropertyChanges {
761 target: appDelegate
762 target: appDelegate
@@ -767,7 +768,7 @@ AbstractStage {
767 requestedHeight: decoratedWindow.oldRequestedHeight
768 requestedHeight: decoratedWindow.oldRequestedHeight
768 visible: spreadMaths.itemVisible
769 visible: spreadMaths.itemVisible
769 }
770 }
770− PropertyChanges { target: inputBlocker; enabled: true }
771+ PropertyChanges { target: dragArea; enabled: true }
771 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
772 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
772 },
773 },
773 State {
774 State {
@@ -1118,21 +1119,25 @@ AbstractStage {
1118 surface: model.surface
1119 surface: model.surface
1119 }
1120 }
1120
1121
1121− MouseArea {
1122+ DragToCloseArea {
1122− id: inputBlocker
1123+ id: dragArea
1123 anchors.fill: parent
1124 anchors.fill: parent
1124 enabled: false
1125 enabled: false
1125− onPressed: mouse.accepted = true;
1126+ closeable: model.application.appId !== "unity8-dash"
1127+
1126 onClicked: {
1128 onClicked: {
1127− print("focusing because of inputBlocker click")
1128 spreadItem.highlightedIndex = index;
1129 spreadItem.highlightedIndex = index;
1130+ if (distance == 0) {
1131+ print("focusing because of inputBlocker click")
1129− priv.goneToSpread = false;
1132+ priv.goneToSpread = false;
1133+ }
1130 }
1134 }
1131− hoverEnabled: true
1132 onContainsMouseChanged: {
1135 onContainsMouseChanged: {
1133 if (containsMouse) spreadItem.highlightedIndex = index
1136 if (containsMouse) spreadItem.highlightedIndex = index
1134 }
1137 }
1138+ onClose: model.surface.close()
1135 }
1139 }
1140+
1136// Rectangle { anchors.fill: parent; color: "blue"; opacity: .4 }
1141// Rectangle { anchors.fill: parent; color: "blue"; opacity: .4 }
1137
1142
1138 WindowInfoItem {
1143 WindowInfoItem {