Skip to content

fix: open panel on the screen with the cursor#29

Merged
hiskudin merged 1 commit into
mainfrom
fix/panel-multi-screen
May 6, 2026
Merged

fix: open panel on the screen with the cursor#29
hiskudin merged 1 commit into
mainfrom
fix/panel-multi-screen

Conversation

@hiskudin

@hiskudin hiskudin commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

NSScreen.main is the screen with the menu bar — i.e. the built-in display on most multi-display Macs. Hard-coding it meant the panel always appeared on the laptop display even when the user was working on an external monitor.

positionPanel() now resolves the screen under the mouse cursor instead, and showPanel() recomputes the position on every open so moving between displays just works without restarting the app.

Test plan

  • Single display: panel still appears in the top-right corner
  • Move cursor to external display → cmd+opt+n → panel appears on external display
  • Move cursor back to internal display → cmd+opt+n again → panel appears on internal display
  • Disconnect external → no crash; panel falls back to the remaining screen

🤖 Generated with Claude Code

NSScreen.main is the screen with the menu bar (built-in display on most
multi-display Macs). Hard-coding it meant the panel always appeared on
the laptop display even when the user was working on an external monitor.

Now positionPanel() resolves the screen under the mouse cursor instead,
and showPanel() recomputes the position on every open so moving between
displays just works without restarting the app.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@hiskudin hiskudin merged commit 56daeb4 into main May 6, 2026
4 checks passed
@hiskudin hiskudin deleted the fix/panel-multi-screen branch May 6, 2026 09:47
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