http://bugs.winehq.org/show_bug.cgi?id=58210
--- Comment #2 from Paul Gofman gofmanp@gmail.com --- A bit more testing on Windows shows that the essential behaviour (extending invalidated rect on Windows) only happens when InvalidateRect() or InvalidateRgn() set NULL rect / region. If rect is specified, even covering the whole window, SetWindowPos() changing size with SWP_NOREDRAW won't extend the invalidated rect. In any case, SWP_NOREDRAW flag is present in WM_WINDOWPOSCHANGING / WM_WINDOWPOSCHANGED (unlike what happens in Wine with the PoC patch).
All this suggests that probably it is not SetWindowPos() special cased for existing invalidated region but rather NULL region (invalidating the whole window) has a bit different semantics between Windows and Wine. Wine currently translates it to full client rect at the moment of invalidating (and thus it is indistinguishable from the app specified full window rect). Instead, it should probably be explicitly flagged as a "full window invalidated" and resolve to actual coordinates only when requested. This way if resize happens in between invalidating NULL rect and obtaining DC / otherwise querying invalidated region the returned region will match the current window size.
I am yet to finalize the tests and implement that.