Skip to content

display config: read live layout from hyprland instead of the cached wlr snapshot - #3418

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
aarshivv:display-config-hyprland-live-layout
Sep 12, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
aarshivv:display-config-hyprland-live-layout

Conversation

@aarshivv

Copy link
Copy Markdown
Contributor

Description

On Hyprland the display config canvas and profile matching use position/transform/scale from the daemon's zwlr_output_manager_v1 snapshot taken at shell start. Hyprland only re-sends those head properties on a mode change, so rotating or moving an output from Settings never updates the canvas: a 90° output stays drawn as landscape until dms is restarted.

  • HyprlandService: liveMonitor() from Hyprland.monitors, refresh monitors after hyprctl reload, emit monitorLayoutChanged only when name/x/y/scale/transform actually change (Quickshell refreshes monitors on every workspace switch, so this is a no-op otherwise).
  • CompositorService: treat configreloaded like monitoraddedv2.
  • DisplayConfigState.buildOutputsMap(): overlay live x/y/scale/transform from Hyprland when the output is present there; rebuild on monitorLayoutChanged. Disabled outputs keep the wlr values.

niri and other compositors are untouched.

Tested on Fedora 44, dms 1.5.3 + this patch, Hyprland 0.56.2 (Lua config), DVI-I-1 1920x1080 + HDMI-A-1 3840x2160@2: Transform 90° → Normal → 90° updates the canvas without a restart, snapping against the portrait output works, no QML warnings in the journal.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Fixes #3417

Screenshots / video

See #3417 for the before state.

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: https://github.com/AvengeMedia/DankLinux-Docs

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.

Checked: the live-overlay in buildOutputsMap() (disabled outputs stay on wlr values since hyprctl monitors omits them; hyprlandToTransform matches mapWlrTransform 1:1; physical size still derives from the wlr mode, which rotation does not change, so getPhysicalSize/getLogicalSize stay consistent), the new HyprlandService Instantiator/Connections pair (same idiom as MprisController, HyprlandMonitor.x/y/scale and .values.find are used elsewhere in the repo, signature guard makes workspace-switch refreshes a no-op), the outputs rebuild on monitorLayoutChanged (mirrors the existing WlrOutputService.onStateChanged handler; pending edits live in pendingChanges so they survive the rebuild, and buildCurrentOutputSet() only compares names so auto-select is not retriggered — no reload feedback loop), reloadConfig/configreloaded guarded to Hyprland-only call paths, no user-facing strings added. Model: claude-opus-5.

@bbedward
bbedward merged commit d7b5812 into duxlabs-dev:master Sep 12, 2026
2 checks passed
deepfriedret pushed a commit to deepfriedret/DankMaterialShell that referenced this pull request Sep 14, 2026
bbedward pushed a commit that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hyprland: display config canvas keeps a rotated monitor in landscape (stale wlr-output state after reload)

2 participants