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
Text change size (becomes tiny) when window changes screen #487
Comments
This happens since mintty 2.1.1 due to the new feature Shift-coupled font-with-window zooming (#204). In this issue, the zoom feature apparently interferes with the fact that full-screen mode is reverted if the window is dragged to another screen (which has always been the case and is probably some Windows feature) and this is not considered with the new feature (yet), so the font is zoomed down to match the terminal size as if the window was still full-screen. |
+1 and I'm dragging mintty window without holding shift key. DPI on both monitors are the same. Actually both monitors are same, resolution and so on. ZoomFontWithWindow=false doesn't help |
What if you move with the Windows hotkeys, Win+Shift+cursor-left/right, as a workaround? |
@mintty, yep. it works this way. thanks! |
Would like to propose fix for this one and #492 - it is a bit simpler than Takashi Kawasaki's change (espresso3389). I tested it with WIndows shortcuts and also by mouse-moving mintty window between screens with very different DPIs (96 & 192, 96 &144 - with and without DPI scaling enabled). Should I open pull request - https://github.com/rupor-github/mintty/commit/2ddd9e55ff010d9c10ac87fdfca0cfc8d76592ff? |
Great, thanks! I'll check that next week. |
Thank you, I fixed code formatting and opened pull request. |
Hmm. I see no different behaviour on Windows 7. If I maximise, then drag to another screen, the window is restored (not maximised) but the font size remains. Only if dragged with Shift, the font size becomes tiny. Same with your patch. |
I do not really know - do not have Windows 7 any more. Tested under Windows 10 - and I did not realize that I have to maximize window :) Will look into this some more. |
@mintty I think real reason for this problem is the fact that during WM_EXITSIZEMOVE message processing call to win_adapt_term_size(shift, false) is wrong. It should be something like win_adapt_term_size(false, shift) instead. I also think that logic related to font scaling is a bit over-complicated in general, particularly with zoom_token. So I tried to correct this - it seems to solve other scaling issues too, in particular #492. Please, take a look at https://github.com/rupor-github/mintty - as I may not be aware of all the details it is quite possible that I am missing something here. |
I'm not sure if this is a separate issue, but it seems related to this issue and so I'll comment on it here. If you use the shortcut for fullscreen ( Weirdly this doesn't happen if the zoom factor is over a certain amount beyond 100%, which for me seems to be 4 |
Alt+Enter toggles full-screen, so the second pressing should restore the window to normal size. |
I updated to the latest cygwin 2.5.2 today. mintty --version says "2.4.0" I'm on Windows 8.1 Professional. I have two identical monitors with the same DPI settings. Whenever I move a mintty window from one screen to another using the mouse, the font and the window gets bigger. I'm not pressing Shift while moving windows. Using Win+CursorKey doesn't show this effect. |
That's not the issue being discussed here. It's actually #566 and was fixed in 2.4.1. |
I've tentatively revised DPI change handling to hook into WM_WINDOWPOSCHANGED rather than WM_DPICHANGED. |
Revised DPI handling as described in #470 (comment); release in 2.5.0 (cygwin test version). |
Checked v2.5.0. Works as expected. Good job! OS: Windows 10
|
I have seen similar behaviour as a consequence of interference with Aero-Snap. Switching off Aero-Snap fixed this for me. |
Released revised DPI handling in 2.5.1; assuming this issue is resolved, too, unless Aero-Snap interferes. |
Just a heads-up, the FancyZones feature of Windows 10 PowerToys also uses Shift to show snap regions (when the corresponding "Enable zones while dragging with the shift key" setting is enabled): https://github.com/microsoft/PowerToys/wiki/FancyZones-Overview#settings |
A workaround with |
It did work, thanks for the link! |
mintty 3.4.1 will also override font zooming behaviour when Ctrl is pressed, too. So with Shift+Ctrl+movement you'd snap to a fancy zone without font zooming |
Released 3.4.1. |
When a window is maximized in one screen, if it's dragged and dropped in another screen the text size changes (becomes tiny) and I need to do ctrl+0 to restore text to the normal size.
It doesn't happen if the window is first restored.
The text was updated successfully, but these errors were encountered: