fix: launcher interrupt ordering race with Hyprland catchall#1543
Closed
hdcy wants to merge 1 commit into
Closed
Conversation
The launcher uses a boolean flag that is set to false by launcher.onPressed and then overwritten to true by launcherInterrupt.onPressed when the catchall binding captures Super_L itself — the final value depends on Hyprland's internal event dispatch order. Replace the boolean with an integer counter: - launcher.onPressed resets it to 0 - launcherInterrupt.onPressed increments it - launcher.onReleased toggles only if count <= 1 A tap of Super alone generates exactly 1 interrupt (Super_L via catchall), so count=1 → launcher opens. Super+any_other_key generates 2+ interrupts, so count>=2 → launcher is correctly suppressed. This is order-independent and fixes the launcher not opening after Hyprland upgrades that change dispatch ordering. Co-Authored-By: Claude Fable 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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Super-key launcher toggle uses a boolean
launcherInterruptedflag:Both
launcherandlauncherInterruptfire on the same Super_L key press — the catchall (bindin = Super, catchall, global, caelestia:launcherInterrupt) captures Super_L itself. The finalinterruptedvalue depends on Hyprland's internal event dispatch order, which changed between 0.55.2 and 0.55.3.This causes the launcher to never open when tapping Super alone.
Fix
Replace the boolean flag with an integer counter:
launcher.onPressedinterrupted = falseinterruptCount = 0launcherInterrupt.onPressedinterrupted = trueinterruptCount++launcher.onReleasedif !interruptedif interruptCount <= 1This is order-independent — it works regardless of whether Hyprland dispatches the specific binding before or after the catchall.
Related
🤖 Generated with Claude Code