Skip to content

Feature Request: Make pop-up windows open on the current screen in multi-monitor setup #941

@jiamingchang

Description

@jiamingchang

Description

Currently, when using SwitchHosts on macOS with multiple monitors, pop-up windows (like adding or editing a host) always appear on the primary display. Even if I click the tray menu on the secondary monitor, the pop-up still opens on the primary monitor.

Expected Behavior

I expect the pop-up window to appear on the same screen where I click the tray/menu icon, instead of always defaulting to the primary display. This would improve workflow in multi-monitor setups.

Steps to Reproduce

  1. Connect a secondary display to a Mac.
  2. Open SwitchHosts and ensure the app is running.
  3. Click the SwitchHosts tray icon on the secondary monitor.
  4. Observe that the pop-up opens on the primary monitor.

Additional Information

  • macOS version: macOS 15.5
  • SwitchHosts version: 4.2.0
  • Electron apps often use screen.getCursorScreenPoint() or screen.getDisplayNearestPoint() to position pop-ups. Implementing similar logic could fix this issue.

Thank you for considering this feature!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions