Window resizing (was CVS update (stuff))

Sam Lantinga wrote:

I think limiting min window size to 32x32 is fine. Remember
the application has to explicitly set a video mode, and can
force supported settings at that point.

I tried this and it worked fine for overriding the min window size but it
left artifacts of the “too big” window when limiting the max window size. I
was able to get around it by adding an InvalidateRect(NULL,NULL,TRUE) just
after the SetWindowPos call, but this seems heavy-handed. It only happens if
the window is resized and then your resize handler decides to make it
smaller. BTW, the Win32 minimum window size is (0,0) since we are just
returning without setting anything in the WM_GETMINMAXINFO handler.

I think an iconify will generate a zero-sized resize event
even if the minimum window size set to non-zero. This
may not be an issue as long as the apps are aware of it.

Can you whip up a quick patch to prevent zero sized
resize events?

I am no longer sure this is an issue. The only reason that it came up in the
first place is when I blissfully called SDL_SetVideoMode with zero height
and then placed the result (a null pointer :slight_smile: into a local variable for
later use. As long as the application’s resize handler is semi-intelligent,
I don’t really see any problems.

  • Randi

Regimental Command
Generic Armored Combat System