-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
cmd line gets out of viewport when system display scaling is in use on Windows #427
Comments
Nobody else have this problem? http://www.southbaypc.com/autosizer/ helps here to force a resize but it is still ugly because it needs to be triggered. |
Hmm, I'm not sure if we're capturing the repro steps because I don't see this behavior.
From your screenshot, there are at least 32 rows in your terminal, and the partial row at the bottom leads me to believe that the window has been resized. If I make my window taller and deliberately size it so that there is a partial row at the bottom, I see a blank space like this: Is there something about your setup or environment that wasn't captured in the issue description? |
hmmm, i played around with my display settings. When putting the scaling to 100% the problem is not there. Due to hardware (native monitor resolution, display size, 4K, ... age of the person in front of the monitor :) ) I have to set it to 200% and then starting with -n looks like this and my problem occurs: (ahm, after reviewing my screenshot I have to say that it looks too big :) I am not that handicaped :) ) |
Heh, I've recently started to hold books at arms length to read and my font sizes on screen have gone up a couple of points :-p
Thanks; I'll look at this with a different system display scaling when I'm next in front of my windows computer! It sounds like wezterm may need to take that into account when it computes the effective dpi of the screen. With that in mind, you may wish to try playing with configuring the return {
dpi = 48.0, -- or 192.0
} You may then need to increase the
No judgements here: you need to look after your eyes! |
Thanks for your hints ! 192 dpi does the job for me. Even without font size changes. So, fix could be something like newdpi=default dpi * windows scaling. (I am only guessing :) )
( sounds like the difference of our ages is not that high :) ) |
The heart of this issue was that the resize callbacks have two layers of state; one in the low level window and one in the application level window. On Windows, the system triggers the low level callback prior to opengl being initialized. Since the application level depends on the opengl state, there are some code paths where it NOPs and returns early if opengl isn't yet initialized. When the system-wide display scaling is set to say 200%, the application layer can't know the effective DPI of the window it is creating because it doesn't know which monitor will be used or what its DPI will be. New windows are created at the default DPI of 96, and we rely on the resize events to detect the actual DPI and adjust the scaling in the window. The early call of the resize callback meant that the low level and application level size/dpi state was out of sync and the result was that the window had half as many pixels as it should, but that the terminal model was still sized as though it had the correct amount (twice as many as visible). This resulted in the window being too small for the viewport. The resolution is simple: we now suppress emitting the resize processing until opengl has been initialized. The test scenario for this is: * Set system scaling to 100% * Launch wezterm * Set system scaling to 200% * Observe that wezterm scales to match * Press CTRL-SHIFT-N to spawn a new window * Observe that the new window size matches the other window (previously this one would be half the size) While I was looking at this, I noticed that the manifest didn't match the DPI awareness that we have in the code, so update that. refs: #427
Thanks for playing with the dpi and confirming that theory! I've pushed a commit that resolves this; it should show up in the nightly builds within an hour or two. If you're interested in the gory details and the simple fix, you can read the commit message: aee3778 Once you're on that build, you can (and should, especially if you have multiple monitors with varying dpi!) remove the |
Nightly build works for me! Thank you very much for fixing it! Well managed product (docu, change process, response time, ... ) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Describe the bug
After opening wezterm I get a cmd line. Then I start writing down commands. As soon as the cmd line runs out of the lower boundary of the window, the view does not scroll to the position to see it again.
Only after resizing the window it scrolls to the right position.
Very strange for me. Hopefully it is the same on your side. Wezterm fits to my visual requirements and I would love to use it. But it is not possible with this bug. I have no time to resize every cmd window after creating it :)
Environment:
To Reproduce
Configuration
Removing config does not help, but here it is...
Expected behavior
When pressing enter, the view should scroll down to the last line (like it is done if I have resized the window one time)
Screenshots
The text was updated successfully, but these errors were encountered: