Avoid window larger than sole display size is capable of

If only one display is available, when running in windowed mode
and asking for Tux Paint to appear in a width and/or height larger
than the display's dimensions, Tux Paint will fall back to
the maximum(s) the display is capable of.

e.g., on my laptop with 1920x1080, running "tuxpaint --2048x2048"
will fall back to 1920x1080 (and display a warning to stdout).
However, if I have my external monitor (also 1920x1080) attached,
it will happily open a 2048x2048 window.  Not perfect, but an
improvement.

Closes https://sourceforge.net/p/tuxpaint/feature-requests/113/
This commit is contained in:
Bill Kendrick 2023-01-19 00:49:13 -08:00
parent 949438e2fb
commit 51c270b519
12 changed files with 98 additions and 6 deletions

View file

@ -298,6 +298,9 @@
<li>1600x1200
</li>
</ul>
<p class="note">
<span title="Information">&#128161;</span> If only one display is available, and Tux Paint is being run in windowed (not fullscreen) mode, and the chosen window size exceeds the capabilities of the display, Tux Paint will fall back to the display's dimensions. </p>
</dd>
<dt>