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.97k stars 2.83k forks source link

Mouse pointer and cursor positions mismatch on Wayland #18579

Open donjan opened 4 days ago

donjan commented 4 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

After a while, the mouse pointer position doesn't match the cursor any more. Clicking into the editor puts the cursor further to the down and right than expected. See attached video. Restarting Zed doesn't help.

Environment

Zed: v0.154.3 (Zed) OS: Linux Wayland ubuntu 24.04 Memory: 15.3 GiB Architecture: x86_64 GPU: Intel(R) UHD Graphics (CML GT2) || Intel open-source Mesa driver || Mesa 24.0.9-0ubuntu0.1

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

https://github.com/user-attachments/assets/f7ad9020-dcd8-4ea7-baa8-f955237706c4

If applicable, attach your Zed.log file to this issue.

-

notpeter commented 4 days ago

Are you by chance using scaling/HiDPI, perhaps with fractional scaling (e.g. 125% or 150%) image I wonder if it's related to:

donjan commented 4 days ago

Scaling is at 1x, fractional scaling is off, no nondefault DPI settings.

It might be connected to switching between the built-in laptop screen and 4k monitor when I move around during the day. Will have to test it when I can close down everything (since restarting only Zed still exhibits the issue, I'd have to restart the desktop session).