diff --git a/README.md b/README.md index 41c74df9..13b5ec8a 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,7 @@ For example, to disable the bar on DP-1: }, "general": { "logo": "caelestia", + "showOverFullscreen": false, "mediaGifSpeedAdjustment": 300, "sessionGifSpeed": 0.7, "apps": { diff --git a/modules/drawers/ContentWindow.qml b/modules/drawers/ContentWindow.qml index 91780a78..c76bafff 100644 --- a/modules/drawers/ContentWindow.qml +++ b/modules/drawers/ContentWindow.qml @@ -31,10 +31,13 @@ StyledWindow { } return monitor?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false; } - property real borderThickness: hasFullscreen ? 0 : contentItem.Config.border.thickness + + property real fsTransitionProg: hasFullscreen ? 1 : 0 + readonly property real sdfBorderOffset: 2 * fsTransitionProg // SDFs joins are not exact, so offset by 2px to ensure nothing shows + readonly property real borderThickness: contentItem.Config.border.thickness * (1 - fsTransitionProg) + readonly property real borderRounding: contentItem.Config.border.rounding * (1 - fsTransitionProg) + readonly property real shadowOpacity: 0.7 * (1 - fsTransitionProg) readonly property real borderLayoutThickness: hasFullscreen ? 0 : contentItem.Config.border.thickness - property real borderRounding: hasFullscreen ? 0 : contentItem.Config.border.rounding - property real shadowOpacity: hasFullscreen ? 0 : 0.7 readonly property int dragMaskPadding: { if (focusGrab.active || panels.popouts.isDetached) @@ -54,11 +57,12 @@ StyledWindow { visibilities.launcher = false; visibilities.session = false; visibilities.dashboard = false; + panels.popouts.close(); } name: "drawers" WlrLayershell.exclusionMode: ExclusionMode.Ignore - WlrLayershell.layer: WlrLayer.Overlay + WlrLayershell.layer: fsTransitionProg > 0 && contentItem.Config.general.showOverFullscreen ? WlrLayer.Overlay : WlrLayer.Top WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session || panels.dashboard.needsKeyboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None mask: hasFullscreen ? emptyRegion : regions @@ -68,20 +72,24 @@ StyledWindow { anchors.left: true anchors.right: true - Behavior on borderThickness { - Anim {} - } - - Behavior on borderRounding { - Anim {} - } - - Behavior on shadowOpacity { + Behavior on fsTransitionProg { Anim {} } Region { id: emptyRegion + + x: panels.notifications.x + bar.implicitWidth + y: panels.notifications.y + root.borderThickness + width: panels.notifications.width + height: panels.notifications.height + + Region { + x: root.width - width + y: panels.osdWrapper.y + root.borderThickness + width: panels.osdWrapper.width * (1 - panels.osd.offsetScale) + root.borderThickness + height: panels.osd.height + } } Regions { @@ -145,10 +153,10 @@ StyledWindow { anchors.margins: -50 // Make border thicker to smooth out bulge from closed drawers group: blobGroup radius: root.borderRounding - borderLeft: bar.implicitWidth - anchors.margins - borderRight: root.borderThickness - anchors.margins - borderTop: root.borderThickness - anchors.margins - borderBottom: root.borderThickness - anchors.margins + borderLeft: bar.implicitWidth - anchors.margins - root.sdfBorderOffset + borderRight: root.borderThickness - anchors.margins - root.sdfBorderOffset + borderTop: root.borderThickness - anchors.margins - root.sdfBorderOffset + borderBottom: root.borderThickness - anchors.margins - root.sdfBorderOffset } PanelBg { diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index bef8f4b8..b89cb007 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -61,7 +61,7 @@ CustomMouseArea { anchors.fill: parent acceptedButtons: fullscreen ? Qt.NoButton : Qt.AllButtons - hoverEnabled: !fullscreen + hoverEnabled: true onPressed: event => dragStart = Qt.point(event.x, event.y) onContainsMouseChanged: { @@ -97,6 +97,11 @@ CustomMouseArea { const dragX = x - dragStart.x; const dragY = y - dragStart.y; + if (fullscreen) { + root.panels.osd.hovered = inRightPanel(panels.osdWrapper, x, y); + return; + } + // Show bar in non-exclusive mode on hover if (!visibilities.bar && Config.bar.showOnHover && x < bar.clampedWidth) bar.isHovered = true; diff --git a/modules/lock/Pam.qml b/modules/lock/Pam.qml index 94832b20..f4c61747 100644 --- a/modules/lock/Pam.qml +++ b/modules/lock/Pam.qml @@ -31,8 +31,8 @@ Scope { } else { buffer = buffer.slice(0, -1); } - } else if (" abcdefghijklmnopqrstuvwxyz1234567890`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?".includes(event.text.toLowerCase())) { - // No illegal characters (you are insane if you use unicode in your password) + } else if (/^[^\x00-\x1F\x7F-\x9F]+$/.test(event.text)) { + // Allow anything except control characters buffer += event.text; } } diff --git a/plugin/src/Caelestia/Config/generalconfig.hpp b/plugin/src/Caelestia/Config/generalconfig.hpp index 73a4915d..859302fe 100644 --- a/plugin/src/Caelestia/Config/generalconfig.hpp +++ b/plugin/src/Caelestia/Config/generalconfig.hpp @@ -90,6 +90,7 @@ class GeneralConfig : public ConfigObject { QML_ANONYMOUS CONFIG_GLOBAL_PROPERTY(QString, logo) + CONFIG_PROPERTY(bool, showOverFullscreen, false) CONFIG_PROPERTY(qreal, mediaGifSpeedAdjustment, 300) CONFIG_PROPERTY(qreal, sessionGifSpeed, 0.7) CONFIG_SUBOBJECT(GeneralApps, apps)