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
Terminal cursor displaced after minimize #3085
Comments
Feel free to try fixing it! |
Thank you! I'll get started on it in a few days and i will keep you updated! Great work on the editor by the way. It seems to run smoothly and i can only imagine the amount of time and effort to get to this point |
I'm unsure as to the answer here. It might be something done in floem? |
I am not sure myself to be honest. I'm looking into it, but if it is something caused by floem it might have to take the problem upstream. |
On Windows, minimize means resize. We need a patch for the See: |
Thank you kindly! I will see if i can get some kind of workaround |
It seems the only way to really stop the cursor from displacing is to keep the width and height of the element when there is a drastic change in the size or to check for the exact size the window is when minimized, but this seems quite hacky an unreliable. I am not entirely sure how to proceed, but i think trying to solve the problem in lapce itself might not be a great idea. I'll keep the issue opened for a while to see if anyone else has some ideas, but i will close the issue soon |
(The issue should remain open even if we can't fix it right now — thank you for trying at it! — because it would still be a bug) |
Good point. I didn't know lapce used a custom winit fork, I'll give it a go |
After some diffing i found out that while there is a resize event taking place when minimizing, it does not seem to be manually called. The winit crate seems to simply set a flag to the window and windows does the rest. Even if i could capture the minimizing event and bypass the size change somehow, the bug still happens when the window is made very small. The only solutions i can think of are a minimum size or bypassing the size setting when checking the percentage of window scaling. Both solutions don't seem reliable. If anyone has any ideas i am glad to try them, but for now i am not sure how to proceed. |
I created a PR for winit lapce/winit#6 to fix the issue when minimizing. But it doesn't work when manually resizing to a small size. I believe that's a bug in ConPTY, as window terminal, vscode integrated terminal, and alacritty have similar issues. https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+label%3AProduct-Conpty+resize |
Lapce Version
0.3.1
System information
Windows 11
Describe the bug
If the content viewer has a file or tab opened of which the contents are taller than the view height, then you minimize the window, the cursor of the terminal will be in te wrong location.
Additional information
Before minimizing:
After minimizing and opening:
After typing:
Based on the small flickering of the window upon opening it, i think it might have something to do with a re-drawing of the element. As it only seems to be happening when you press the minimize button and not when activating another window, it might have something to do with a state change when ghe minimizing happens.
Is it alright if i pick up the issue and see if i can fix it?
The text was updated successfully, but these errors were encountered: