on xenial help sign in
Satellite child windows (LP: #1673415)
4141b11Daniel d'Andrada
qml/Stage/ChildWindow.qml+6−1
@@ -44,6 +44,7 @@ FocusScope {
44 readonly property bool decorated: surface ? surface.type === Mir.UtilityType
44 readonly property bool decorated: surface ? surface.type === Mir.UtilityType
45 || surface.type === Mir.DialogType
45 || surface.type === Mir.DialogType
46 || surface.type === Mir.NormalType
46 || surface.type === Mir.NormalType
47+ || surface.type === Mir.SatelliteType
47 : false
48 : false
48
49
49 readonly property bool moveable: decorated
50 readonly property bool moveable: decorated
@@ -101,7 +102,10 @@ FocusScope {
101 height: units.gu(3)
102 height: units.gu(3)
102 title: root.surface ? root.surface.name : ""
103 title: root.surface ? root.surface.name : ""
103 active: root.surface ? root.surface.focused : false
104 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
105 minimizeButtonVisible: false
109 minimizeButtonVisible: false
106 maximizeButtonShown: false
110 maximizeButtonShown: false
107 onPressed: root.surface.activate();
111 onPressed: root.surface.activate();
@@ -110,6 +114,7 @@ FocusScope {
110 d.moveHandler.handlePositionChanged(mouse);
114 d.moveHandler.handlePositionChanged(mouse);
111 }
115 }
112 onReleased: if (d.moveHandler) { d.moveHandler.handleReleased(); }
116 onReleased: if (d.moveHandler) { d.moveHandler.handleReleased(); }
117+ onCloseClicked: root.surface.close();
113 }
118 }
114 }
119 }
115 }
120 }