It could happpen that the WM thinks a window is active but it's actually not, like when showing a context menu. In most cases we should follow what WM says to keep consistent bevaviour on all platforms.