[Bug 12104] Cygwin's setup.exe doesn't resize properly

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Feb 10 14:59:40 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=12104


Bernhard Übelacker <bernhardu at vr-web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernhardu at vr-web.de




--- Comment #3 from Bernhard Übelacker <bernhardu at vr-web.de>  2009-02-10 14:59:39 ---
still present in git from 2009-02-09.

It is also visible in the first page.

This setup consists of some property pages
laying on a property sheet. It replaces the
the WindowProc of the sheet. In the custom
WindowProc it relies that on startup
a WM_SIZE message is received.

cygwin:propsheet.cc:PropSheetWndProc
  The first time we get a WM_SIZE, the client rect will be all zeros.)
(for this reason I think it wants to ignore the first one, but needs it)

This WindowProc begins to adjusts the controls
from the second WM_SIZE message it receives.
Therefore if you maximize the window it receives
one message (the first one) which is ignored and
the controls are still unresized/moved sitting in
the full screen parent window.

If you resize the frame first a little bit and maximize
it now the window is resized (nearly) correct.

The missing WM_SIZE I think should be sent in
wine:dlls/user32/defwnd.c:DEFWND_HandleWindowPosChanged
by somehow getting SWP_NOCLIENTSIZE unset or
SWP_STATECHANGED set.

I tested with quick adding in
wine:dlls/user32/winpos.c:USER_SetWindowPos
just before the last SendMessageW the following:

@@ -2005,4 +2005,5 @@ BOOL USER_SetWindowPos( WINDOWPOS * winpos )
         winpos->cx = newWindowRect.right - newWindowRect.left;
         winpos->cy = newWindowRect.bottom - newWindowRect.top;
+        winpos->flags |= SWP_STATECHANGED;
         SendMessageW( winpos->hwnd, WM_WINDOWPOSCHANGED, 0, (LPARAM)winpos );
     }

With this modification the resize works for this setup
(but will surely break all other applications)

I will attach logs (WINEDEBUG=trace+message) once without and
once with the modification.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list