"Lei Zhang" thestig@google.com writes:
I added more tests for this and also looked at the trace log from the tests. My last patch was definitely wrong because it prevents the window/client size from changing, whereas they do change on Windows. I check for this in the tests now.
I looked at the content of the WM_WINDOWPOSCHANGED messages, and I noticed SWP_NOCLIENTSIZE was set for the cases where the window is too small. So SWP_DoNCCalcSize seems like the right place to check for this, and not clear SWP_NOCLIENTSIZE.
You are still on the wrong track, you shouldn't mess with the SWP_* flags at all. What you have to do is figure out where the size limits should be enforced on the window; once you fix this, SetWindowPos will automatically get the right flags because the size will be clamped to the limit.