FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix(LockScreenManager): detect Hyprland lock screens (hyprlock, Omarchy) under Flatpak by GrantAbell · Pull Request #648 · StreamController/StreamController · GitHub

Fix(LockScreenManager): detect Hyprland lock screens (hyprlock, Omarchy) under Flatpak - #648

Open
GrantAbell wants to merge 2 commits into
StreamController:mainfrom
GrantAbell:main
Open

GrantAbell wants to merge 2 commits into
StreamController:mainfrom
GrantAbell:main

Conversation

Copy link
Copy Markdown

Problem

Lock screen sync never fires in the Flatpak build on Hyprland, the deck stays live and interactive after the screen locks. This affects both plain hyprlock and Omarchy's Quickshell-based lock screen.

Cause

HyprlandLockScreenDetector binds hyprland_lock_notifier_v1. That protocol isn't hyprlock-specific, Hyprland fires it for any ext-session-lock client, but the compositor doesn't advertise it to sandboxed clients. Enumerating wl_registry on the same session gives 71 globals natively and 40 inside the Flatpak, without the notifier among them. setup() subscribed to something that never arrives and returned without trying anything else: no error, no fallback, no lock.

Fix

Wayland now records whether the notifier was actually advertised. On Hyprland we still prefer it when it's there. When it isn't, the Hyprland branch no longer dead-ends, it tries, in order:

  1. Omarchy: if the session answers omarchy-shell lock isLocked, a small polling detector uses that. Any answer that isn't true/false counts as "not an Omarchy session", so it stays out of the way everywhere else.
  2. hyprlock: hyprlock has no IPC of its own, but its process runs for exactly as long as the session is locked. The same signal hypridle configs test for with pidof hyprlock, so we watch for that.
  3. logind: reachable from inside the sandbox, so it also covers loginctl lock-session setups where neither of the above applies.

Both new detectors follow the existing Hyprland/MangoWM window grabber pattern — flatpak-spawn --host via Xdp, daemon thread gated on gl.threads_running — and dispatch through GLib.idle_add, since lock() reaches into the deck controllers and the other detectors all deliver on the main thread.

Nothing changes for setups that work today; the new paths are only reachable when the notifier is missing.

Testing

  • Omarchy 4.0.0.alpha, Hyprland 0.56.2: native picks the Hyprland notifier detector, Flatpak picks the Omarchy detector. Locking and unlocking gives a matching Locking screen: True / False pair in both, and the deck blanks and restores.
  • hyprlock: I don't have it installed (Omarchy 4 dropped it), so the detector was exercised against a stand-in process named hyprlock. Reads unlocked while absent, locked while running, and reports the transition back when it exits.
  • Detector selection was checked for all four cases (notifier / Omarchy / hyprlock / none → logind), and both real environments here still select what they did before.
  • Existing tests pass.

GrantAbell and others added 2 commits September 2, 2026 21:58
The Hyprland branch relies on hyprland_lock_notifier_v1, which the
compositor does not advertise to sandboxed clients, so the Flatpak build
subscribes to a notifier that never arrives and returns without trying
anything else.

Fall back to watching for the hyprlock process, which runs for exactly as
long as the session is locked, and let the branch fall through to logind
instead of dead-ending when no Hyprland specific source is available.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL