simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Sep 8 13:45:05 BST 2019


TL;DR:
  b60230db Windows: fix resizing of a maximised window.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-09-08 13:45:05

commit b60230dbb8a55da4a29a31c1787a6926010aa901
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b60230dbb8a55da4a29a31c1787a6926010aa901;hp=14bef228b0b48c58cb887a032f97c71a6fe2b7f7
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 8 13:40:14 2019 +0100

    Windows: fix resizing of a maximised window.
    
    The RESIZE_EITHER resizing mode responds to a window resize by
    changing the logical terminal size if the window is shown normally, or
    by changing the font size to keep the terminal size the same if the
    resize is a transition between normal and maximised state.
    
    But a user pointed out that it's also possible for a window to receive
    a WM_SIZE message while _remaining_ in maximised state, and that
    PuTTY's resize logic didn't allow for that possibility. It occurs when
    there's a change in the amount of available screen space for the
    window to be maximised _in_: e.g. when the video resolution is
    reconfigured, or when you reconnect to a Remote Desktop session using
    a client window of a different size, or even when you toggle the
    'Automatically hide the taskbar' option in the Windows taskbar settings.
    
    In that situation, the right thing seems to be for PuTTY to continue
    to go with the policy of changing the font size rather than the
    logical terminal size. In other words, we prefer to change the font
    size when the resize is _from_ maximised state, _to_ maximised state,
    _or both_.
    
    That's easily implemented by removing the check of the 'was_zoomed'
    flag, in the case where we've received a WM_SIZE message with the
    state SIZE_MAXIMIZED: once we know the transition is _to_ maximised
    state, it doesn't matter whether or not it was also _from_ it. (But we
    still set the was_zoomed flag to the most recent maximised status, so
    that we can recognise transitions _out_ of maximised mode.)

 windows/window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the tartarus-commits mailing list