on xenial help sign in
don't let the unhandled clicks reach the (obscured) window control buttons

in the decoration we still want to have the decoration there to be able to grab the window behind to unmaximize it though fixes the failing Shell::test_maximizedWindowAndMenuInPanel() test as well

commitc7d7633effa5b304361159f467a6624566774e10 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateMon 3 Apr 2017, 14:54 (10 years ago) parentc26643b
4 files changed+5−2
qml/Panel/Panel.qml+2−2 qml/Stage/DecoratedWindow.qml+1 qml/Stage/Stage.qml+1 qml/Stage/WindowDecoration.qml+1
qml/Panel/Panel.qml+2−2
@@ -220,7 +220,7 @@ Item {
220220 sourceComponent: MenuBar {
221221 id: bar
222222 objectName: "menuBar"
223− anchors.left: parent.left
223+ anchors.left: parent ? parent.left : undefined
224224 anchors.margins: units.gu(1)
225225 height: menuBarLoader.height
226226 enableKeyFilter: valid && PanelState.decorationsVisible
@@ -339,7 +339,7 @@ Item {
339339 maximumLineCount: 1
340340 fontSize: "medium"
341341 font.weight: Font.Medium
342− color: Theme.palette.selected.backgroundText
342+ color: theme.palette.selected.backgroundText
343343 opacity: __applicationMenus.visible && !__applicationMenus.expanded ? 1 : 0
344344 visible: opacity != 0
345345 Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration } }
qml/Stage/DecoratedWindow.qml+1
@@ -38,6 +38,7 @@ FocusScope {
3838 property alias maximizeButtonShown: decoration.maximizeButtonShown
3939 property alias interactive: applicationWindow.interactive
4040 readonly property alias orientationChangesEnabled: applicationWindow.orientationChangesEnabled
41+ property alias windowControlButtonsVisible: decoration.windowControlButtonsVisible
4142
4243 // Changing this will actually add/remove a decoration, meaning, requestedHeight will take the decoration into account.
4344 property bool hasDecoration: true
qml/Stage/Stage.qml+1
@@ -1385,6 +1385,7 @@ FocusScope {
13851385 requestedHeight: appContainer.height;
13861386 }
13871387 PropertyChanges { target: touchControls; enabled: true }
1388+ PropertyChanges { target: decoratedWindow; windowControlButtonsVisible: false }
13881389 },
13891390 State {
13901391 name: "fullscreen"; when: appDelegate.fullscreen && !appDelegate.minimized
qml/Stage/WindowDecoration.qml+1
@@ -34,6 +34,7 @@ MouseArea {
3434 property var menu: undefined
3535 property bool enableMenus: true
3636 property bool windowMoving: false
37+ property alias windowControlButtonsVisible: buttons.visible
3738
3839 readonly property real buttonsWidth: buttons.width + row.spacing
3940