Felix Nawothnig flexo@holycrap.org writes:
This fixes #7198. Problem is that GetForegroundWindow() sometimes returns NULL (MSDN says: "in certain circumstances, such as when a window is losing activation"). I didn't bother to check why this happens for some apps (winemine works fine for me, winecfg doesn't - I suspect timing issues) here as I saw no point in this check anyway:
The point is that the window should not be painted active if it's not the foreground window too. There is one active window per queue, but only one foreground window.