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

Fix blurry icon, image and cursor for hidpi #82

Merged
merged 2 commits into from
Jul 23, 2023
Merged

Fix blurry icon, image and cursor for hidpi #82

merged 2 commits into from
Jul 23, 2023

Conversation

moetayuko
Copy link

@moetayuko moetayuko commented Apr 22, 2023

fixes #45

The fix is basically trial-and-error so I'm not sure about its correctness tho...

@moetayuko moetayuko changed the title [IconFetcher] Apply scaling when loading images and icons Fix blurry icon, image and cursor for hidpi Apr 22, 2023
@moetayuko
Copy link
Author

@lbonn should pass the CI now. I just don't come up with better ideas to deal with the dependency hell of unit tests

@lbonn
Copy link
Owner

lbonn commented Apr 26, 2023

@moetayuko thanks for looking into this!

I'll try to check it in the next few days.

@moetayuko moetayuko marked this pull request as draft May 18, 2023 07:25
@moetayuko
Copy link
Author

It seems that the value returned by display_scale() could change at runtime, need to cache the requested scale in IconFetcherEntry and re-fetch the icon when it changes.

@lbonn
Copy link
Owner

lbonn commented Jun 1, 2023

@moetayuko I think even without dynamic scale changes, this PR is still useful. The changes look good but haven't had time to test it yet. We already have bigger problems with changing screen / resolution: #50.

If you are fine with it we can continue with the merging process.

@moetayuko
Copy link
Author

This PR consists of two fixes. 20cd2d4 is fine and should be ready to merge, but 6f2a997 does not work for @q234rty (ps: it works for me). There seems to be a race condition for him, where wayland->scale is used before it gets updated in wayland_surface_protocol_enter.

Loading cursor theme and creating cursor surface are postponed to
wayland_pointer_enter because we don't know the display scale in the
early wayland_display_setup.

Partially fixes #45
@moetayuko moetayuko marked this pull request as ready for review July 10, 2023 07:26
@moetayuko
Copy link
Author

@lbonn This is working as expected now

@q234rty
Copy link

q234rty commented Jul 21, 2023

Works for me :)

@lbonn lbonn merged commit 0b223c1 into lbonn:wayland Jul 23, 2023
4 checks passed
@lbonn lbonn mentioned this pull request Nov 2, 2023
2 tasks
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.

[BUG] Icons & Cursor Low-Res on Hi-DPI Wayland
3 participants