Zhiyi Zhang (@zhiyi) commented about dlls/d3d8/tests/device.c:
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Adapter %u: SetForegroundWindow failed, error %#lx.\n", adapter_idx, GetLastError()); flush_events();
/* In case of premature restoration of the window (fvwm2/3, randomly), try again. */
if (GetForegroundWindow() != GetDesktopWindow())
I can't reproduce this error on FVWM2. I can reproduce the one at d3d9/device.c#L14926 though.
Another is that fvwm seems to place the window slightly offscreen, maybe shifted by the size of the window decoration. I am still looking into those issues.
I think they are the same issue. So I suppose it's better to wait until you figure out why FVWM2/3 shifted the position and come up with something better instead of this workaround. I can confirm the -9 is from FVWM2 sending a new ConfigureNotify event. You can trace the calls to SendConfigureNotify() and find out where the -9 is coming from in FVWM2.
One issue I encountered previously is FVWM2 not respecting PPosition fully by default. Please see c7d748d. Does FVWM3 need the same settings?