Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse cursor offset after turning on a HiDPI monitor #41849

Closed
timothyqiu opened this issue Sep 7, 2020 · 5 comments · Fixed by #56825
Closed

Mouse cursor offset after turning on a HiDPI monitor #41849

timothyqiu opened this issue Sep 7, 2020 · 5 comments · Fixed by #56825

Comments

@timothyqiu
Copy link
Member

Godot version: 3.2.3 beta 1 ~ rc 5

OS/device including version:
MacBook Pro (Retina, 13-inch, Early 2015)
Intel Iris Graphics 6100 1536 MB

Issue description:

With the HiDPI monitor turned off (closed the MBP lid), I opened the Godot editor using only the non-HiDPI external monitor.

After turning on the HiDPI monitor (opening the lid), the appearance of Godot editor stays normal, but the mouse cursor seems to be using a HiDPI coordinate.

Also, after turning on the HiDPI monitor, drag the editor to the HiDPI monitor, and then drag it back, the seamless display scaling fails.

Steps to reproduce:

  1. Use only the non-HiDPI monitor, turn off the HiDPI monitor
  2. Open the Godot Editor
  3. Turn on the HiDPI monitor

Minimal reproduction project: Not project related

@bruvzg bruvzg self-assigned this Sep 7, 2020
@bruvzg bruvzg added this to the 4.0 milestone Sep 7, 2020
@bruvzg
Copy link
Member

bruvzg commented Sep 7, 2020

Can't reproduce, turning HiDPI monitor on (or switching monitor to HiDPI mode) do affect editor scale (without DPI independent mode implemented in the renderer, unlikely this can be fixed), but mouse input is handled correctly. Maybe internal monitor is not sending display reconfiguration events for some reason.

@timothyqiu
Copy link
Member Author

timothyqiu commented Sep 7, 2020

It's strange that I can't reproduce the mouse cursor offset now either.

All I did is changing the display arrangement in system preference (move the HiDPI monitor from the left to the bottom of the LoDPI one). But I can't reproduce after I move it back.

@timothyqiu
Copy link
Member Author

Nevermind... I opened the 3.2.2 version of Godot after changing the arrangement. I can still reproduce it in RC 5.

Sorry for the misinformation.

@timothyqiu
Copy link
Member Author

I added a NSLog to the displays_arrangement_changed function, and it was called after turning on the HiDPI monitor.

Just to make sure, is the LoDPI monitor your primary display?

If I set the HiDPI monitor to be the primary display, the mouse input issue does not exist because the window is automatically moved to the HiDPI monitor after the monitor is turned on. My primary display is the LoDPI one, so the editor window stays on the LoDPI monitor, thus the mouse input offset.

@bruvzg
Copy link
Member

bruvzg commented Sep 7, 2020

Just to make sure, is the LoDPI monitor your primary display?

With LoDPI monitor set to primary I can reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants