on xenial help sign in
React to window title (aka surface name) changes Fixes: #1497092
eb75df3Lukáš Tinkl
qml/Stages/ApplicationWindow.qml+2
@@ -27,6 +27,8 @@ FocusScope {
27 readonly property bool fullscreen: application ? application.fullscreen : false
27 readonly property bool fullscreen: application ? application.fullscreen : false
28 property alias interactive: sessionContainer.interactive
28 property alias interactive: sessionContainer.interactive
29 property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true
29 property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true
30+ readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ?
31+ sessionContainer.surface.name : d.name
30
32
31 // to be set from outside
33 // to be set from outside
32 property QtObject application
34 property QtObject application
qml/Stages/DecoratedWindow.qml+1−1
@@ -66,7 +66,7 @@ FocusScope {
66 objectName: application ? "appWindowDecoration_" + application.appId : "appWindowDecoration_null"
66 objectName: application ? "appWindowDecoration_" + application.appId : "appWindowDecoration_null"
67 anchors { left: parent.left; top: parent.top; right: parent.right }
67 anchors { left: parent.left; top: parent.top; right: parent.right }
68 height: units.gu(3)
68 height: units.gu(3)
69− title: model.name
69+ title: window.title !== "" ? window.title : model.name
70 onClose: root.close();
70 onClose: root.close();
71 onMaximize: root.maximize();
71 onMaximize: root.maximize();
72 onMinimize: root.minimize();
72 onMinimize: root.minimize();
qml/Stages/SurfaceContainer.qml+1
@@ -28,6 +28,7 @@ FocusScope {
28 property bool hadSurface: false
28 property bool hadSurface: false
29 property bool interactive
29 property bool interactive
30 property int surfaceOrientationAngle: 0
30 property int surfaceOrientationAngle: 0
31+ property string name: surface ? surface.name : ""
31 property bool resizeSurface: true
32 property bool resizeSurface: true
32
33
33 onSurfaceChanged: {
34 onSurfaceChanged: {