1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
From 02b894f1b39d016c4cac3ecbc66d215e041076c5 Mon Sep 17 00:00:00 2001
From: Alfred Neumayer <dev.beidl@gmail.com>
Date: Sun, 3 Mar 2024 23:10:29 +0100
Subject: [PATCH 10/11] qml: Rework application window surface clipping
Don't pass the pointer too many layers down, instead rely
on a good old bool property for handling the switch.
Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
qml/Stage/ApplicationWindow.qml | 4 ++--
qml/Stage/DecoratedWindow.qml | 3 ++-
qml/Stage/Stage.qml | 2 +-
qml/Stage/SurfaceContainer.qml | 3 ---
4 files changed, 5 insertions(+), 7 deletions(-)
@@ -37,7 +37,7 @@
property int requestedWidth: -1
property int requestedHeight: -1
property real splashRotation: 0
- property var stage : null
+ property bool clip: false
readonly property int minimumWidth: surface ? surface.minimumWidth : 0
readonly property int minimumHeight: surface ? surface.minimumHeight : 0
@@ -145,7 +145,7 @@
requestedWidth: root.requestedWidth
requestedHeight: root.requestedHeight
surfaceOrientationAngle: application && application.rotatesWindowContents ? root.surfaceOrientationAngle : 0
- stage: root.stage
+ clip: root.clip
onSizeChanged: root.sizeChanged(size)
}
@@ -39,7 +39,6 @@
property alias interactive: applicationWindow.interactive
readonly property alias orientationChangesEnabled: applicationWindow.orientationChangesEnabled
property alias windowControlButtonsVisible: decoration.windowControlButtonsVisible
- property alias stage: applicationWindow.stage
property PanelState panelState
// Changing this will actually add/remove a decoration, meaning, requestedHeight will take the decoration into account.
@@ -83,6 +82,8 @@
property alias altDragEnabled: altDragHandler.enabled
+ property alias clipSurface: applicationWindow.clip
+
property Item windowMargins
signal closeClicked()
@@ -2008,7 +2008,6 @@
objectName: "decoratedWindow"
anchors.left: appDelegate.left
anchors.top: appDelegate.top
- stage: root
application: model.application
surface: model.window.surface
active: model.window.focused
@@ -2024,6 +2023,7 @@
boundsItem: root.availableDesktopArea
panelState: root.panelState
altDragEnabled: root.mode == "windowed"
+ clipSurface: root.mode === "windowed"
lightMode: root.lightMode
requestedWidth: appDelegate.requestedWidth
@@ -35,7 +35,6 @@
property bool interactive
property int surfaceOrientationAngle: 0
property bool isPromptSurface: false
- property var stage : null
// FIME - dont export, use interactive property. Need to fix qtmir to handle consumesInputChanged
// to update surface activeFocus. See mock MirSurfaceItem.
property alias consumesInput: surfaceItem.consumesInput
@@ -81,8 +80,6 @@
antialiasing: !root.interactive
orientationAngle: root.surfaceOrientationAngle
- clip: stage && stage.mode === "windowed"
-
Connections {
target: surfaceItem.surface
onSizeChanged: {
|