[Bug 4964] MDI child not informed of max/minimization

Wine Bugs wine-bugs at winehq.org
Wed May 3 07:30:22 CDT 2006


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


juris.smotrovs at sets.lv changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #2181 is|0                           |1
           obsolete|                            |




------- Additional Comments From juris.smotrovs at sets.lv  2006-03-05 07:30 -------
Created an attachment (id=2387)
 --> (http://bugs.winehq.org/attachment.cgi?id=2387&action=view)
Improved patch solving the problem

As I discovered, the previous patch made some wine tests
(dlls/user/tests/msg.c) to fail. The problem lies in correctly setting the
flags SWP_NOSIZE and SWP_NOCLIENTSIZE. A careful examination of these and
related tests showed that:
1) these flags should be set when the size in pixels of the corresponding
rectangles has changed (already implemented in Wine),
2) they should be set also when size in pixels has not changed, but window has
changed state between "maximized", "minimized" and "restored" (see description
of WM_SIZE; currently NOT implemented in Wine),
3) they should *not* be set when maximize, minimize or restore command is
issued on a window which is already, respectively, maximized, minimized or
restored.
Unfortunately, the information enabling to distinguish between 2) and 3) (i.e.
SW_... command	flags plus the current state of window) is available only in
X11DRV_ShowWindow(), but is already lost inside X11DRV_SetWindowPos() which is
actually responsible for setting the SWP_NOSIZE, SWP_NOCLIENTSIZE flags and is
called from X11DRV_ShowWindow().

Thus, for the current implementation of these functions, some way is needed to
pass the necessary data from X11DRV_ShowWindow() to X11DRV_SetWindowPos(). I
did not dare to change the interfaces, i.e. to add new flags to window
structures or parameters to these important functions. I suppose, it is rather
a prerogative of the people directly responsible for x11drv.

Therefore I offer this patch which uses an already existing flag WIN_NEED_SIZE
in a way not conflicting with its current usage, though, to achieve that, the
patch is a bit clumsy.

Anyway, this patch solves the first (Win32 application) testcase problem, and
considerably improves behaviour of Wine on the second (dlls/user/tests/msg.c)
testcase, also making one existing todo testcase to succeed:
msg.c:3230: Test succeeded inside todo block: ShowWindow(SW_HIDE):overlapped:
marked "todo_wine" but succeeds

If you do not accept this patch as it is, I hope, it enables you to solve this
issue without much effort -- knowing which interface changes one can afford
here (e.g. adding a new flag similar to WIN_NEED_SIZE which would make the
correction less clumsy).

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list