on xenial help sign in
Make sure cursor is back to normal when closing the window

This is not optimal since cursor may now be on top of a different resize area and should change to that, unfortunately QtQuick doesn't recalculate what mouseArea is hovered when another is destroyed :/ But better moving to the default cursor than being stuck with a weird resize cursor. (LP: #1666158) Approved by: Lukáš Tinkl, Unity8 CI Bot

commita43da51ec47ff9a80cd3820a547079c65bf75f06 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 8 Mar 2017, 09:49 (10 years ago) parent74d637c7df27ee
1 file changed+12
qml/Stage/WindowResizeArea.qml+12
qml/Stage/WindowResizeArea.qml+12
@@ -152,6 +152,18 @@ MouseArea {
152152 onCursorNameChanged: {
153153 Mir.cursorName = cursorName;
154154 }
155+ Component.onDestruction: {
156+ // TODO Qt 5.8 has fixed the problem with containsMouse
157+ // not being updated when the MouseArea that had containsMouse
158+ // is hidden/removed. When we start using Qt 5.8 we should
159+ // try to fix this scenario
160+ // two windows side by side
161+ // cursor in the resize left area of the right one
162+ // close window by Alt+F4
163+ // cursor should change to resize right of the left one
164+ // currently changes to ""
165+ Mir.cursorName = "";
166+ }
155167
156168 function updateBorders() {
157169 leftBorder = mouseX <= borderThickness;