Zebediah Figura (@zfigura) commented about dlls/d3d9/tests/device.c:
- device_desc.width = registry_mode.dmPelsWidth;
- device_desc.height = registry_mode.dmPelsHeight;
device_desc.width = d3ddm.Width;
device_desc.height = d3ddm.Height; device_desc.device_window = device_window; device_desc.flags = CREATE_DEVICE_FULLSCREEN; ok(SUCCEEDED(reset_device(device, &device_desc)), "Failed to reset device.\n");
/* FVWM2 doesn't update its knowledge about the screen size on mode changes. It
* will therefore try to resize our fullscreen window to the original size. We
* don't learn about this until we process messages, but then we receive a
* WM_SIZE message after d3d9 stopped filtering. To dodge the issue, switch to
* the original mode when testing for WM_SIZE, but double check that the window
* size was changed. */
GetWindowRect(device_window, &r1);
I'm finding this comment a bit difficult to understand, sorry. The problem—what's making the test fail—is just that it tries to resize our window, right? I.e. for the purposes of the test, it doesn't matter that it's also to the wrong size?
This doesn't really seem like it's "dodging" the issue, either. The whole point of 37daa3573 is to test that WM_SIZE isn't sent, and here, it is. I suppose we can detect fvwm2 by checking that it's resizing to the wrong size, but it does kind of cripple the test.
Why does changing mode twice make a difference?