Skip to content

Still sticky.. #77

@garrattg

Description

@garrattg

It still is sticky, so I ran hammerspoon log, then put it into claude::

Here's a summary to post to the Middle GitHub repo:


Title: Middle button gets stuck (no MIDDLE_UP) when app focus changes mid-gesture or on windows with nil/empty names

Description:

I'm experiencing an issue where the middle-drag gesture gets "stuck" - a MIDDLE_DOWN fires but the corresponding MIDDLE_UP never arrives, leaving the system in a perpetual middle-drag state.

Environment:

  • macOS
  • Using Middle with Loop window manager
  • Trackpad

Trigger conditions identified through logging:

  1. App focus changes mid-gesture - Starting a middle-drag in one app, then the cursor moves over a different app (especially one with win=nil) before the gesture completes

  2. Windows with nil/empty window names - The issue frequently occurs when interacting with:

    • Find My (win=nil)
    • Finder with empty window name (win=)
    • CrossOver/Wine apps (e.g., VC_redist.x64.exe, vcredist_x64.exe)
    • Secure system dialogs (Passwords app)
  3. Rapid/overlapping gestures - Two MIDDLE_DOWN events firing before a MIDDLE_UP, causing one to become orphaned

Example sequence from logs:

22:18:07 | MIDDLE_DOWN | pos=(1333,943) | app=Wavebox | win=Deskeen Release Notes
22:18:08 | MIDDLE_DOWN | pos=(1347,953) | app=Find My | win=nil    <-- second DOWN before first UP
22:18:08 | MIDDLE_UP   | pos=(1349,961) | app=Find My | win=nil    <-- only closes second one
22:18:11 | MIDDLE_DOWN | pos=(1571,967) | app=Wavebox              <-- this one gets stuck
22:18:16 | MIDDLE_STILL_DOWN | heldFor=5s downPos=(1571,967)       <-- no UP ever arrives

Suspected cause:

Middle may not be handling the case where:

  • A second MIDDLE_DOWN occurs before the first MIDDLE_UP
  • The MIDDLE_UP event is swallowed by windows that don't properly propagate events (nil window names, virtualized apps, secure dialogs)

Possible fix suggestions:

  • Track gesture state and ignore/reset if a second MIDDLE_DOWN arrives unexpectedly
  • Add a timeout to auto-release stuck middle-down states
  • Handle windows with nil/empty names differently

Metadata

Metadata

Labels

bugSomething isn't workingfixed-pending-releaseIssue has been fixed in the next release

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions