Skip to content

Conversation

@dacap
Copy link
Member

@dacap dacap commented Nov 8, 2025

  • Refactor to avoid using [NSScreen mainScreen] as the primary screen which is NSScreen.screens[0] in fact
  • The absolute mouse position should be relative to the primary screen, reverts 6dacf91 in some way, but to pick a color from the screen we'll have to use an absolute mouse position relative to the primary screen (no to the main screen which varies on macOS depending on the keyboard focus)
  • Fixes [osx] Fix creation of windows in a specific location w/multiple screens #162

To avoid confusion with the [NSScreen mainScreen] concept which is the
screen containing the active keyboard focused window.
@dacap dacap self-assigned this Nov 8, 2025
We can detect when the mouse is being moved by the user in case that
we want to update something (e.g. the window coordinates) in the
client area (multiple_windows example does this).
@dacap dacap force-pushed the fix-multiple-screens branch from 5235371 to 779f5a6 Compare November 10, 2025 14:20
* Simplify code to locate the each window
* Added possibility to resize a window w/shift+arrow keys
@dacap
Copy link
Member Author

dacap commented Nov 10, 2025

Before:

Screenshot 2025-11-10 at 12 09 53 PM

After 25d60a2:

Screenshot 2025-11-10 at 11 58 47 AM

The "H" window is not located correctly because it looks like a macOS bound check in the initialization of a new app to avoid overlapping the dock (even if the window is not close to the dock at all).

@dacap dacap marked this pull request as ready for review November 10, 2025 15:13
@dacap dacap merged commit 25d60a2 into aseprite:main Nov 10, 2025
12 checks passed
@dacap dacap deleted the fix-multiple-screens branch November 10, 2025 19:34
dacap added a commit to dacap/aseprite that referenced this pull request Nov 10, 2025
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.

[osx] Fix creation of windows in a specific location w/multiple screens

1 participant