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

[macOS] Implement seamless display scaling. #40084

Merged
merged 1 commit into from
Jul 4, 2020

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jul 3, 2020

Use the highest display scale to calculate window/screen coordinates and for rendering, downscale (we do not need to do it ourselves, just let OS to do the job) on lower scale displays. Also, should fix popup positions.

Before (moving from hiDPI to lowDPI display):
mmove2

After:
mmove1

Fixes #5688 (no scale changes when moving from screen to screen)
Fixes #13017 (incorrect project window position when started from editor and project have different DPI settings).

Update:

  • Added missing No Focus flag implementation.
  • And tested all window_... and screen_... functions in the DS, except window_set_input_text_callback (callback is not used on any desktop platform) and window_set_transient (I have no idea what it is really supposed to do), everything seems to work.

scene/main/window.cpp Outdated Show resolved Hide resolved
@akien-mga
Copy link
Member

Fixes #5688 I presume?

@bruvzg bruvzg force-pushed the macos_seamless_scaling branch from daf33d6 to 3cebfa9 Compare July 3, 2020 12:08
@bruvzg
Copy link
Member Author

bruvzg commented Jul 3, 2020

Fixes #5688 I presume?

Yes

@bruvzg bruvzg force-pushed the macos_seamless_scaling branch from 3cebfa9 to 3bf006d Compare July 3, 2020 12:45
@bruvzg bruvzg requested a review from a team as a code owner July 3, 2020 12:45
@bruvzg bruvzg force-pushed the macos_seamless_scaling branch 3 times, most recently from a208dd7 to 2b4875a Compare July 3, 2020 22:07
@bruvzg bruvzg changed the title [WIP, macOS] Implement seamless display scaling. [macOS] Implement seamless display scaling. Jul 3, 2020
@bruvzg bruvzg force-pushed the macos_seamless_scaling branch from 2b4875a to df968d5 Compare July 4, 2020 07:37
@akien-mga akien-mga merged commit 8ccb1ce into godotengine:master Jul 4, 2020
@akien-mga
Copy link
Member

Thanks hugely!

@bruvzg

This comment has been minimized.

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