on xenial help sign in
Satellite child windows
commit682d93785c5552ed5f307f2b40b4b92addf68599 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 22 Mar 2017, 17:13 (10 years ago) parent8401926
1 file changed+6−1
qml/Stage/ChildWindow.qml+6−1
qml/Stage/ChildWindow.qml+6−1
@@ -44,6 +44,7 @@ FocusScope {
4444 readonly property bool decorated: surface ? surface.type === Mir.UtilityType
4545 || surface.type === Mir.DialogType
4646 || surface.type === Mir.NormalType
47+ || surface.type === Mir.SatelliteType
4748 : false
4849
4950 readonly property bool moveable: decorated
@@ -101,7 +102,10 @@ FocusScope {
101102 height: units.gu(3)
102103 title: root.surface ? root.surface.name : ""
103104 active: root.surface ? root.surface.focused : false
104− closeButtonVisible: false
105+ closeButtonVisible: root.surface ? root.surface.type === Mir.SatelliteType
106+ || root.surface.type === Mir.NormalType
107+ || root.surface.type === Mir.UtilityType
108+ : false
105109 minimizeButtonVisible: false
106110 maximizeButtonShown: false
107111 onPressed: root.surface.activate();
@@ -110,6 +114,7 @@ FocusScope {
110114 d.moveHandler.handlePositionChanged(mouse);
111115 }
112116 onReleased: if (d.moveHandler) { d.moveHandler.handleReleased(); }
117+ onCloseClicked: root.surface.close();
113118 }
114119 }
115120 }