zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.03k stars 2.7k forks source link

Blurry mouse pointer on Wayland #13258

Closed filipwiech closed 6 days ago

filipwiech commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I have the following setup:

When I move Zed onto the 4K screen, the window is scaled nicely (correct size and crisp graphics), however whenever I move the mouse pointer over the editor it becomes blurry. It has the correct size, but it's as if the icon used for the rendering came from a lower resolution asset. If I move the pointer outside of the Zed window (for example over the desktop or some other application) then it becomes sharp. Sorry for no images, but unfortunately it doesn't show on screenshots.

Environment

Zed: v0.141.0 (Zed Nightly d4891a62bb3bd45db713fa576a13f8a5d95ca382) OS: Linux Wayland ubuntu 24.04 Memory: 31 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log


notpeter commented 1 month ago

Can you try the commands shown in https://github.com/zed-industries/zed/issues/14862 to see if that helps?

senonide commented 1 month ago

Same problem with this setup:

Only when I move the mouse pointer over the editor, it becomes blurry. It seems that the problem comes from scaling at 200% because this does not happen when the screen is at a scaling factor of 100%.

Can you try the commands shown in #14862 to see if that helps?

I tried it but it doesn't fix the problem. I am already using the default cursor in Fedora (Adwaita)

apricotbucket28 commented 3 weeks ago

I believe the issue here is that when we set the cursor surface for the pointer we don't actually specify the buffer scale for said wl_surface. Here's SCTK code for reference: https://github.com/Smithay/client-toolkit/blob/c583de8dd5651f8168c6513cd282137c42aae049/src/seat/pointer/mod.rs#L458-L495