https://bugs.winehq.org/show_bug.cgi?id=55066
Bug ID: 55066 Summary: user32:msg - test_button_messages() sometimes gets WM_SIZE instead of WM_SETFOCUS in Wine Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
user32:msg - test_button_messages() sometimes gets WM_SIZE instead of WM_SETFOCUS in Wine:
msg.c:6897: Test failed: SetFocus(hwnd) on a button: 4: the msg 0x0007 was expected, but got msg 0x0005 instead msg.c:6897: Test failed: SetFocus(hwnd) on a button: 5: the msg 0x0138 was expected, but got msg 0x030f instead msg.c:6897: Test failed: SetFocus(hwnd) on a button: 6: the msg 0x0111 was expected, but got msg 0x001c instead msg.c:6897: Test failed: SetFocus(hwnd) on a button: 8: the msg 0x8000 was expected, but got msg 0x0086 instead msg.c:6897: Test failed: SetFocus(hwnd) on a button: 9: the msg sequence is not complete: expected 0000 - actual 0006
See https://test.winehq.org/data/patterns.html#user32:msg
This first happened on 2023-05-19 and since then it has been happening in about 4% of the runs.
https://bugs.winehq.org/show_bug.cgi?id=55066
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- https://gitlab.winehq.org/wine/wine/-/merge_requests/3492#note_41119 revealed some information about this, which is that we're actually getting HCBT_ACTIVATE, not WM_SIZE.
https://bugs.winehq.org/show_bug.cgi?id=55066
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=55066
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- Is it possible there's something external in the testbot environment that deactivates the window (such that the SetFocus call in the test activates it)?
https://bugs.winehq.org/show_bug.cgi?id=55066
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- Is there an easy way I can see exactly how this debian environment is created, or recreate it?
https://bugs.winehq.org/show_bug.cgi?id=55066
--- Comment #4 from François Gouget fgouget@codeweavers.com --- I uploaded the wtbdebian11b VM to https://transfert.free.fr/dSWffpN (this link will remain valid for 30 days). The password is winetest (not the password used by the TestBot, see also the admin account in /home). You will probably need to adjust the VM's network configuration and change /etc/network/interface to use DHCP (replace static with dhcp and delete the lines that follow).
There is a Wine checkout in /home/winetest/tools/testbot/var/wine which you may want to refresh and which you will need to build using the old Windows-on-Windows mode which is where the failures happen.
https://bugs.winehq.org/show_bug.cgi?id=55066
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- I tried running this in a loop until a button test failed, but I ended up getting a different failure: BM_SETSTYLE on a button got an unexpected WM_MOUSEACTIVATE which was the result of the WM focusing our window when it was initially shown.
This sort of makes sense, I suppose. That message takes time to get to us, so perhaps the test completes before the WM can do that in most cases.
https://bugs.winehq.org/show_bug.cgi?id=55066
--- Comment #6 from Esme Povirk madewokherd@gmail.com --- Perhaps WM_TAKE_FOCUS should be a no-op on the Windows side if the window is already the foreground window.
https://bugs.winehq.org/show_bug.cgi?id=55066
--- Comment #7 from Esme Povirk madewokherd@gmail.com --- Either that or the test window should not log WM_MOUSEACTIVATE and return MA_NOACTIVATE.