=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: user32: Silently ignore temporary foreground loss.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 2 09:47:14 CST 2015


Module: wine
Branch: master
Commit: ccf430eb52fb9a3a7c8bfdcbe7805025fb6f5dec
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ccf430eb52fb9a3a7c8bfdcbe7805025fb6f5dec

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Fri Oct 30 18:17:02 2015 +0100

user32: Silently ignore temporary foreground loss.

The basic problem is this: Thread A has a window W1 that is it's focus
window and the system-global foreground window. At some point thread A
stops processing messages. After that, thread B creates a window W2
and makes it the foreground window. Thread B later on makes W1 (from
Thread A) the foreground window again. After restoring W1 as the
foreground window, Thread A processes window messages again. Two
WM_WINE_SETACTIVEWINDOW messages are in the queue, one for losing the
foreground thread propery and one for restoring it. The first one will
generates a WM_ACTIVATEAPP(0) message, which causes D3D to minimize
the game window.

The included test shows that Windows doesn't deliver any
WM_ACTIVATEAPP messages if the thread stopped being the foreground
thread and re-gained that property between two message processing
calls. It isn't implemented with a plain WM_ACTIVATEAPP filter, the
manually injected message in the test still gets through.

Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/user32/message.c   |   1 +
 dlls/user32/tests/win.c | 224 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+)

Diff:   http://source.winehq.org/git/wine.git/?a=commitdiff;h=ccf430eb52fb9a3a7c8bfdcbe7805025fb6f5dec



More information about the wine-cvs mailing list