Files
Marlon Kranzandpurian23 0444835016 fix(frame): make connected mode honor the settings it overrides (#3665)
* fix(frame): make connected mode honor the settings it overrides

Several frame-mode behaviors contradicted what the settings UI shows:

- Frame -> Blur gated blur for every shell surface in connected mode,
  including the Settings window, polkit, context menus, OSDs and toasts.
  WindowBlur now defaults to Background blur; only surfaces painted
  with the frame color (connected popouts, slideouts, Control Center)
  follow Frame -> Blur, and frame-owned surfaces are blurred by the
  frame as before.
- The notepad slideout painted its own fill at the notepad
  transparency. On screens where the frame owns connected chrome it now
  claims a frame surface (new connected_arc slot 5), so the frame paints
  it flush with the cutout, with fillets, and follows the slide.
- Notification popups painted a card surface on top of the frame body,
  stacking fills. That layer is transparent when the frame paints it.
- Connected mode stripped shadow, border and corner styling from every
  bar, including bars on displays without a frame, and hid the rows.
  Styling is now stripped and restored per bar based on whether it
  covers a frame display, re-checked on screen, frame display and
  display-name-mode changes.
- Auto popup gaps and Gap size were hidden in separate mode although
  they still apply there; they now hide only in connected mode.
- The launcher style picker was hidden in connected mode while Island
  still overrode the connected launcher. Connected mode now always uses
  the connected launcher; the picker shows Full, disabled, with a note
  linking to the Bar layout picker.
- The frame shadow ignored Shadows -> Apply to -> Bars.

* fix(frame): address review feedback on connected mode

- Skip bar style reconciliation while the screen list is empty, so a
  hotplug doesn't restore and re-strip every bar.
- Replace the 16 copies of the connector blur anchor and cutout in
  FrameWindow with a ConnectorBlurRegion inline component.
- Let connected mode use the island launcher again now that the island
  can sit in any bar. The picker offers Full and Island there and hides
  Spotlight, which opens the full launcher in that mode anyway; the note
  and the SettingsControlledBy bar target are dropped.

* frame: address review findings on connected mode

---------

Co-authored-by: purian23 <[email protected]>
2026-10-10 00:04:17 -04:00

104 lines
3.9 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Common
import qs.Services
import qs.Widgets
Variants {
id: dockVariants
readonly property var dockSlots: {
SettingsData.dockConfigs;
SettingsData.barConfigs;
const slots = [];
for (const screen of Quickshell.screens) {
for (const config of SettingsData.dockConfigsForScreen(screen)) {
if (CompositorService.frameHostsDockForConfig(screen, config))
continue;
slots.push(JSON.stringify([screen.name, config.id]));
}
}
return slots;
}
model: dockVariants.dockSlots
property var contextMenu
property var trashContextMenu
delegate: PanelWindow {
id: dock
readonly property alias body: body
required property var modelData
readonly property var identity: JSON.parse(modelData)
readonly property var targetScreen: ShellLayout.screenForName(identity[0])
readonly property var resolvedConfig: SettingsData.getDockConfig(identity[1])
// Keep the last resolved config so the body never sees a shapeless one while the delegate is torn down.
property var config: resolvedConfig
onResolvedConfigChanged: if (resolvedConfig)
config = resolvedConfig
screen: dock.targetScreen
color: "transparent"
WlrLayershell.namespace: "dms:dock"
WlrLayershell.layer: body.editMode || body.usesOverlayLayer ? WlrLayer.Overlay : WlrLayer.Top
// Edit mode grows the window over the whole screen so the scrim captures every click.
anchors {
top: body.editMode || (!body.isVertical ? (dock.config.position === SettingsData.Position.Top) : true)
bottom: body.editMode || (!body.isVertical ? (dock.config.position === SettingsData.Position.Bottom) : true)
left: body.editMode || (!body.isVertical ? true : (dock.config.position === SettingsData.Position.Left))
right: body.editMode || (!body.isVertical ? true : (dock.config.position === SettingsData.Position.Right))
}
visible: !!resolvedConfig && (resolvedConfig.enabled || (resolvedConfig.openOnOverview && CompositorService.isNiri))
WlrLayershell.keyboardFocus: PopoutManager.screenshotActive ? WlrKeyboardFocus.None : body.editMode ? WlrKeyboardFocus.Exclusive : body.interactionActive ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
implicitWidth: body.surfaceImplicitWidth
implicitHeight: body.surfaceImplicitHeight
readonly property bool manualPlacement: body.editMode || (body.isVertical && dock.config.mode === "taskbar")
exclusiveZone: manualPlacement ? -1 : body.surfaceExclusiveZone
Component.onCompleted: SurfaceRecovery.track(dock)
Component.onDestruction: SurfaceRecovery.untrack(dock)
WindowBlur {
targetWindow: dock
blurEnabled: !body.usesConnectedFrameChrome
surfaceColor: body.surfaceColor
blurX: body.blurX
blurY: body.blurY
blurWidth: body.blurWidth
blurHeight: body.blurHeight
blurRadius: body.blurRadius
}
mask: body.editMode ? null : bodyMask
Region {
id: bodyMask
item: body.inputMaskItem
}
DockBody {
id: body
anchors.fill: parent
config: dock.config
hostWindow: dock
modelData: dock.targetScreen
contextMenu: dockVariants.contextMenu
trashContextMenu: dockVariants.trashContextMenu
}
EdgeExclusion {
screen: dock.targetScreen
edge: body.connectedBarSide
exclusionSize: (dock.manualPlacement || body.frameDockExclusionActive) && body.shouldReserveDockSpace ? body.dockReserveZone : 0
layerNamespace: "dms:dock-exclusion"
}
}
}