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 cursor style when resizing window #11596
Conversation
I think this is a good idea but rather than simply not resetting the cursor style while dragging, shouldn't it be set explicitly to the cursor style of whatever you're dragging, and that way it won't randomly change back to arrow? AFAIK this basically relies on the cursor staying the same if you simply don't set it, but IMHO the cursor should be actively set properly during the drag. |
For some reason, Zed decided to reset the cursor #9289 . Without understanding the intent of the Zed team, I decided to minimize the scope of impact in this PR. |
Doesn't that just prove the method you're using is flaky? The cursor should be set every frame. You actually wouldn't have to avoid resetting the cursor at all if you made the reset pick the correct one when you're currently dragging something. I'll probably take a crack at this after I'm done fixing language servers. |
Makes sense. I'm busy with another unpublished PR may conduct a more in-depth investigation after completing it. |
I think the problems here are deeper than this PR, so I'm going to close this for now. I think a full solution would require either figuring out what is clobbering the cursor, or adjusting how set_cursor works to block changes when dragging, or associate the drag and cursor more closely. |
Before:
Recording.2024-05-09.165756.mp4
After:
Recording.2024-05-09.165632.mp4
Note:
It's not completely fixed; sometimes (like when moving the mouse quickly), it still changes from
resize
toarrow
.Also, I'm not sure if this modification has affected #9289.
Release Notes: