I expect this is going to be tricky to get in. I ran into the following issues:
* test_ShowWindow behaves very strangely on Windows. It seems this isn't typical behavior, and is caused by an interaction with test_SetFocus, but I'm not sure exactly what it does to the thread state that causes this.
* Many of the SetWindowPos flag combinations tested don't actually show the window on Windows, therefore they don't send EVENT_SYSTEM_FOREGROUND. I was able to reproduce this with a stand-alone test, so it seems to be normal behavior.
* Windows can show a window without activating it, and Wine on X11 can't do that reliably for managed windows.
* There are a couple of cases where Windows sends an event and Wine doesn't. I figure it's OK to not cover every case, but I can go back and investigate those if needed.
This interacts with https://gitlab.winehq.org/wine/wine/-/merge_requests/2314, in that the tests don't really test much without it. I applied that MR for my own testing.
--
v5: win32u: Implement EVENT_SYSTEM_FOREGROUND.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2853
I expect this is going to be tricky to get in. I ran into the following issues:
* test_ShowWindow behaves very strangely on Windows. It seems this isn't typical behavior, and is caused by an interaction with test_SetFocus, but I'm not sure exactly what it does to the thread state that causes this.
* Many of the SetWindowPos flag combinations tested don't actually show the window on Windows, therefore they don't send EVENT_SYSTEM_FOREGROUND. I was able to reproduce this with a stand-alone test, so it seems to be normal behavior.
* Windows can show a window without activating it, and Wine on X11 can't do that reliably for managed windows.
* There are a couple of cases where Windows sends an event and Wine doesn't. I figure it's OK to not cover every case, but I can go back and investigate those if needed.
This interacts with https://gitlab.winehq.org/wine/wine/-/merge_requests/2314, in that the tests don't really test much without it. I applied that MR for my own testing.
--
v4: user32: Run tests that notice focus changes early.
win32u: Implement EVENT_SYSTEM_FOREGROUND.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2853
Two main changes:
- VM configuration in build.yml for the executor.
- The build-mac script is now architecture-agnostic.
--
v2: gitlab: Update configuration for the new Mac runner.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5749
--
v3: win32u: Use a helper to flush window surface, factor locking and bounds reset.
wineandroid: Hold the lock while reading window surface bits.
winemac: Get rid of unnecessary blit_data / drawn surface members.
win32u: Move window surface bounds to the window_surface base struct.
win32u: Use helpers to lock/unlock window surfaces.
win32u: Move the window surface mutex to the surface header.
win32u: Introduce a new window_surface_init helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5747
--
v2: win32u: Use a helper to flush window surface, factor locking and bounds reset.
winemac: Get rid of unnecessary blit_data / drawn surface members.
win32u: Move window surface bounds to the window_surface base struct.
win32u: Use helpers to lock/unlock window surfaces.
win32u: Move the window surface mutex to the surface header.
win32u: Introduce a new window_surface_init helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5747
I looked a bit at mmdevice properties, turns out device strings are available directly from property store, using this key:
{9c119480-ddc2-4954-a150-5bd240d454ad},1
The only problem is it's not documented in SDK. But the idea would be to populate property store with setupapi, or use setupapi/cfgmgr directly.
Anyway, mentioning this in case we'll even need it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5734#note_71634