Skip to content

fix: launcher interrupt ordering race with Hyprland catchall#1543

Closed
hdcy wants to merge 1 commit into
caelestia-dots:mainfrom
hdcy:fix/launcher-interrupt-race
Closed

fix: launcher interrupt ordering race with Hyprland catchall#1543
hdcy wants to merge 1 commit into
caelestia-dots:mainfrom
hdcy:fix/launcher-interrupt-race

Conversation

@hdcy

@hdcy hdcy commented Jun 10, 2026

Copy link
Copy Markdown

Problem

The Super-key launcher toggle uses a boolean launcherInterrupted flag:

launcher.onPressed           → interrupted = false
launcherInterrupt.onPressed  → interrupted = true   (catchall captures Super_L itself!)
launcher.onReleased          → check interrupted → DON'T toggle ❌

Both launcher and launcherInterrupt fire on the same Super_L key press — the catchall (bindin = Super, catchall, global, caelestia:launcherInterrupt) captures Super_L itself. The final interrupted value 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:

Event Old (fragile) New (order-independent)
launcher.onPressed interrupted = false interruptCount = 0
launcherInterrupt.onPressed interrupted = true interruptCount++
launcher.onReleased if !interrupted if interruptCount <= 1
  • Tap Super alone: 1 interrupt (Super_L via catchall) → count=1 ≤ 1 → launcher opens
  • Super+another_key: 2+ interrupts (Super_L + other key) → count≥2 > 1 → suppressed

This is order-independent — it works regardless of whether Hyprland dispatches the specific binding before or after the catchall.

Related

🤖 Generated with Claude Code

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>
@hdcy hdcy marked this pull request as draft June 10, 2026 14:21
@hdcy hdcy marked this pull request as ready for review June 10, 2026 14:21
@hdcy hdcy marked this pull request as draft June 10, 2026 14:21
@hdcy hdcy closed this Jun 10, 2026
@hdcy hdcy deleted the fix/launcher-interrupt-race branch June 10, 2026 14:23
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.

1 participant