simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Jan 8 16:01:55 GMT 2022
TL;DR:
229d062 Windows: reinstate SetWindowPos in check_window_size.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2022-01-08 16:01:55
commit 229d062d6ce63f0a5e00d2de62ee0fb389ccfdb6
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=229d062d6ce63f0a5e00d2de62ee0fb389ccfdb6;hp=6a4209b17875f5cfd2b37178e15c2aa2839c0d8d
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Jan 8 14:43:01 2022 +0000
Windows: reinstate SetWindowPos in check_window_size.
The purpose of check_window_size is to be run after we try to resize
the puzzle window, decide whether the window size needs a further
update, and if so, make it. But the SetWindowPos call that actually
made the update (triggered by the subroutine check_window_resize
returning true to indicate that a change was needed) had mysteriously
gone missing.
An example case where this goes wrong: start up a puzzle at a game
size large enough to need a tile size smaller than default. Then
change the setting to one so small that the menu bar is now the
limiting factor on how small the window can be. (For example, changing
Mosaic from its 50x50 preset to 3x3, if your monitor isn't so huge
that the former fits.) The window comes out the wrong size, and with
this SetWindowPos reinstated, now it gets corrected.
What seems to have happened was that the SetWindowPos was originally
under #ifndef _WIN32_WCE, i.e. we only want to do it on desktop
Windows, not on CE. Then commit 39d299f579da3e9 (introducing manual
window resizing in the Windows front end) moved the call into a
different function, and in the process, accidentally reversed the
sense of the #ifdef. And then commit ff3e762fd007883 (removing the
bit-rotted Windows CE support completely) removed it, along with
everything else under #ifndef _WIN32_WCE!
It was originally supposed to be _enabled_ on desktop Windows, not
disabled. So I've put it back now.
windows.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the tartarus-commits
mailing list