MDI client repaint issues (client and children) and conformance tests for this

Reece Dunn msclrhd at
Fri Feb 5 10:35:50 CST 2010


I have been looking at
which shows up as the MDI client window not being repainted properly
when a new child is created given an already maximised child window
being present.

There is a related issue here that sometimes the child window frames
are not being redrawn properly.

I am trying to understand where this problem is occurring, and am
failing to see the big picture.

As I understand it, WM_MDIRESTORE is sent for the maximised child
window, which calls ShowWindow(SW_RESTORE) on the child. This is then
(from what I can tell) is handled by the windowing code (with the
client behaving like a desktop window), which is taking care of the
positioning and layout of the child windows.

For some reason, the parent window (the client) is not being updated
properly (i.e. a WM_ERASEBKGND+WM_PAINT is not being sent). Likewise,
the child windows don't appear to be handling and/or receiving a
WM_NCPAINT message to redraw their frame.

In addition to this, looking at the message trail tests in
user32/tests/msg.c, only some of these are testing a
WM_ERASEBKGND+WM_PAINT message is being sent. How accurate are these
with respect to WM_PAINT messages (that is, are WM_PAINT messages
ignored in message trails unless explicitly tested for?).

And in terms of a fix, what is the best approach for fixing the issue?
That is, Alexandre does not like an explicit call to InvalidateRect in
the WM_MDICREATE handler, so I assume that the repaint logic should be
done in a more specific place or figure out why it is not being called
for the MDI client.

- Reece

More information about the wine-devel mailing list