From a08e9e0e799c785167c4484cdbe4cecb304c120d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Wed, 16 Jul 2025 09:34:22 +0700 Subject: [PATCH] screen corners: not have a fullscreen layer --- .../modules/screenCorners/ScreenCorners.qml | 85 +++++++++---------- 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml index b5fc4828..b7d9ee67 100644 --- a/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml +++ b/.config/quickshell/ii/modules/screenCorners/ScreenCorners.qml @@ -11,63 +11,56 @@ Scope { id: screenCorners readonly property Toplevel activeWindow: ToplevelManager.activeToplevel + component CornerPanelWindow: PanelWindow { + id: cornerPanelWindow + visible: (Config.options.appearance.fakeScreenRounding === 1 || (Config.options.appearance.fakeScreenRounding === 2 && !activeWindow?.fullscreen)) + property var corner + + exclusionMode: ExclusionMode.Ignore + mask: Region { + item: null + } + WlrLayershell.namespace: "quickshell:screenCorners" + WlrLayershell.layer: WlrLayer.Overlay + color: "transparent" + + anchors { + top: cornerPanelWindow.corner === RoundCorner.CornerEnum.TopLeft || cornerPanelWindow.corner === RoundCorner.CornerEnum.TopRight + left: cornerPanelWindow.corner === RoundCorner.CornerEnum.TopLeft || cornerPanelWindow.corner === RoundCorner.CornerEnum.BottomLeft + bottom: cornerPanelWindow.corner === RoundCorner.CornerEnum.BottomLeft || cornerPanelWindow.corner === RoundCorner.CornerEnum.BottomRight + right: cornerPanelWindow.corner === RoundCorner.CornerEnum.TopRight || cornerPanelWindow.corner === RoundCorner.CornerEnum.BottomRight + } + + implicitWidth: cornerWidget.implicitWidth + implicitHeight: cornerWidget.implicitHeight + RoundCorner { + id: cornerWidget + size: Appearance.rounding.screenRounding + corner: cornerPanelWindow.corner + } + } + Variants { model: Quickshell.screens - PanelWindow { - visible: (Config.options.appearance.fakeScreenRounding === 1 - || (Config.options.appearance.fakeScreenRounding === 2 - && !activeWindow?.fullscreen)) - - property var modelData - - screen: modelData - exclusionMode: ExclusionMode.Ignore - mask: Region { - item: null - } - WlrLayershell.namespace: "quickshell:screenCorners" - WlrLayershell.layer: WlrLayer.Overlay - color: "transparent" - - anchors { - top: true - left: true - right: true - bottom: true - } - - RoundCorner { - id: topLeftCorner - anchors.top: parent.top - anchors.left: parent.left - size: Appearance.rounding.screenRounding + Scope { + required property var modelData + CornerPanelWindow { + screen: modelData corner: RoundCorner.CornerEnum.TopLeft } - RoundCorner { - id: topRightCorner - anchors.top: parent.top - anchors.right: parent.right - size: Appearance.rounding.screenRounding + CornerPanelWindow { + screen: modelData corner: RoundCorner.CornerEnum.TopRight } - RoundCorner { - id: bottomLeftCorner - anchors.bottom: parent.bottom - anchors.left: parent.left - size: Appearance.rounding.screenRounding + CornerPanelWindow { + screen: modelData corner: RoundCorner.CornerEnum.BottomLeft } - RoundCorner { - id: bottomRightCorner - anchors.bottom: parent.bottom - anchors.right: parent.right - size: Appearance.rounding.screenRounding + CornerPanelWindow { + screen: modelData corner: RoundCorner.CornerEnum.BottomRight } - } - } - }