lbonn / rofi

Rofi: A window switcher, run dialog and dmenu replacement - fork with wayland support
Other
927 stars 36 forks source link

Fix blurry icon, image and cursor for hidpi #82

Closed moetayuko closed 1 year ago

moetayuko commented 1 year ago

fixes #45

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

moetayuko commented 1 year ago

@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 commented 1 year ago

@MoetaYuko thanks for looking into this!

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

moetayuko commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

This PR consists of two fixes. https://github.com/lbonn/rofi/pull/82/commits/20cd2d446bfb7dd436c39bafd9a03a77529cd21b is fine and should be ready to merge, but https://github.com/lbonn/rofi/pull/82/commits/6f2a9977bab619fc90b0c83a799b1f8b3e8e3906 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.

moetayuko commented 1 year ago

@lbonn This is working as expected now

q234rty commented 1 year ago

Works for me :)