mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00

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.
This is the README accompanying the source code to Simon Tatham's puzzle collection. The collection's web site is at <https://www.chiark.greenend.org.uk/~sgtatham/puzzles/>. The puzzle collection is built using CMake <https://cmake.org/>. To compile in the simplest way (on any of Linux, Windows or Mac), run these commands in the source directory: cmake . cmake --build . The manual is provided in Windows Help format for the Windows build; in text format for anyone who needs it; and in HTML for the Mac OS X application and for the web site. It is generated from a Halibut source file (puzzles.but), which is the preferred form for modification. To generate the manual in other formats, rebuild it, or learn about Halibut, visit the Halibut website at <https://www.chiark.greenend.org.uk/~sgtatham/halibut/>.
Description
Languages
C
93.3%
JavaScript
1.4%
Objective-C
1.1%
CMake
1.1%
HTML
0.8%
Other
2.2%