React to window title (aka surface name) changes Fixes: #1497092
commiteb75df3b0a6b80b038f420d167026a3e9dd10790
authorLukáš Tinkl <lukas.tinkl@canonical.com>
dateWed 21 Oct 2015, 11:50 (11 years ago)
parent265e559b229955
qml/Stages/ApplicationWindow.qml+2
@@ -27,6 +27,8 @@ FocusScope {
2727 readonly property bool fullscreen: application ? application.fullscreen : false
2828 property alias interactive: sessionContainer.interactive
2929 property bool orientationChangesEnabled: d.supportsSurfaceResize ? d.surfaceOldEnoughToBeResized : true
30+ readonly property string title: sessionContainer.surface && sessionContainer.surface.name !== "" ?
31+ sessionContainer.surface.name : d.name
3032
3133 // to be set from outside
3234 property QtObject application
qml/Stages/DecoratedWindow.qml+1−1
@@ -66,7 +66,7 @@ FocusScope {
6666 objectName: application ? "appWindowDecoration_" + application.appId : "appWindowDecoration_null"
6767 anchors { left: parent.left; top: parent.top; right: parent.right }
6868 height: units.gu(3)
69− title: model.name
69+ title: window.title !== "" ? window.title : model.name
7070 onClose: root.close();
7171 onMaximize: root.maximize();
7272 onMinimize: root.minimize();
qml/Stages/SurfaceContainer.qml+1
@@ -28,6 +28,7 @@ FocusScope {
2828 property bool hadSurface: false
2929 property bool interactive
3030 property int surfaceOrientationAngle: 0
31+ property string name: surface ? surface.name : ""
3132 property bool resizeSurface: true
3233
3334 onSurfaceChanged: {