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

[wayland platform] Less broken display on scaled hosts #3037

Merged
merged 2 commits into from
Sep 13, 2023
Merged

Conversation

AlanGriffiths
Copy link
Contributor

@AlanGriffiths AlanGriffiths commented Sep 11, 2023

Don't confuse scaling of host environment with internal scaling of outputs.

Fixes: #3036

Note: this fixes the display and cursor positioning and so is generally an improvement. However, there are remaining oddities with the cursor image. These are arguably pre-existing, and don't make things unusable

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #3037 (d0407f7) into main (afb3f93) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main    #3037   +/-   ##
=======================================
  Coverage   77.70%   77.71%           
=======================================
  Files        1056     1056           
  Lines       73394    73397    +3     
=======================================
+ Hits        57030    57037    +7     
+ Misses      16364    16360    -4     
Files Changed Coverage Δ
src/platforms/wayland/display.cpp 1.32% <0.00%> (-0.01%) ⬇️
src/platforms/wayland/displayclient.cpp 0.00% <0.00%> (ø)
src/platforms/wayland/displayclient.h 0.00% <ø> (ø)

... and 5 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AlanGriffiths
Copy link
Contributor Author

The alpine-edge failure is fixed by #3038

Copy link
Contributor

@mattkae mattkae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question that maybe warrants a comment in the code if it is non-obvious

@@ -718,7 +719,8 @@ void mgw::DisplayClient::pointer_enter(
{
if (surface == out.second->surface)
{
pointer_displacement = out.second->dcout.top_left - geometry::Point{};
pointer_displacement = geom::DisplacementF{out.second->dcout.top_left - geometry::Point{}};
host_scale = out.second->host_scale;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we setting the host_scale during pointer_enter?

Copy link
Contributor

@mattkae mattkae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested and things appear to be working with 200% zoom on my host 🎉

@mattkae mattkae added this pull request to the merge queue Sep 13, 2023
Merged via the queue into main with commit d11b9e9 Sep 13, 2023
33 checks passed
@mattkae mattkae deleted the fix-3036 branch September 13, 2023 14:54
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.

display scaling breaks gl renderer clipping
2 participants