@@ -115,7 +115,6 @@ Item {
115115 }
116116
117117 MouseArea {
118− id: mouseArea
119118 anchors {
120119 top: parent.top
121120 left: parent.left
@@ -125,6 +124,26 @@ Item {
125124 hoverEnabled: true
126125 onClicked: { if (callHint.visible) { callHint.showLiveCall(); } }
127126 onDoubleClicked: PanelState.maximize()
127+
128+ // WindowControlButtons inside the mouse area, otherwise QML doesn't grok nested hover events :/
129+ // cf. https://bugreports.qt.io/browse/QTBUG-32909
130+ WindowControlButtons {
131+ id: windowControlButtons
132+ objectName: "panelWindowControlButtons"
133+ anchors {
134+ left: parent.left
135+ top: parent.top
136+ leftMargin: units.gu(1)
137+ topMargin: units.gu(0.5)
138+ bottomMargin: units.gu(0.5)
139+ }
140+ height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
141+ visible: PanelState.buttonsVisible && parent.containsMouse && !root.locked && !callHint.visible
142+ active: PanelState.buttonsVisible
143+ onClose: PanelState.close()
144+ onMinimize: PanelState.minimize()
145+ onMaximize: PanelState.maximize()
146+ }
128147 }
129148
130149 IndicatorsMenu {
@@ -163,24 +182,6 @@ Item {
163182 }
164183 }
165184
166− WindowControlButtons {
167− id: windowControlButtons
168− objectName: "panelWindowControlButtons"
169− anchors {
170− left: parent.left
171− top: parent.top
172− leftMargin: units.gu(1)
173− topMargin: units.gu(0.5)
174− bottomMargin: units.gu(0.5)
175− }
176− height: indicators.minimizedPanelHeight - anchors.topMargin - anchors.bottomMargin
177− visible: PanelState.buttonsVisible && mouseArea.containsMouse && !root.locked && !callHint.visible
178− active: PanelState.buttonsVisible
179− onClose: PanelState.close()
180− onMinimize: PanelState.minimize()
181− onMaximize: PanelState.maximize()
182− }
183−
184185 Label {
185186 id: titleLabel
186187 objectName: "windowDecorationTitle"
@@ -215,7 +216,7 @@ Item {
215216 id: __callHint
216217 anchors {
217218 top: parent.top
218− left: windowControlButtons.visible ? windowControlButtons.right : parent.left
219+ left: parent.left
219220 }
220221 height: indicators.minimizedPanelHeight
221222 visible: active && indicators.state == "initial"