This reverts commit b3eb55227aef198a637f80a2fa0bce74aa0a7190.
Since 278b98f5b21b56abdf9229b12b2a747be6917018 it should be unnecessary to
process the events as the current display mode is written to the registry.
This fixes a random deadlock that happens when a window is updating its state
while another thread changes the current display settings.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6701
This MR should be no-op and doesn't change much, but makes some small refactoring in preparation for an improved window state tracker as designed in https://gitlab.winehq.org/wine/wine/-/merge_requests/6569.
Overall with that full MR not much would be changed either, and instead some existing fields are replaced with a cleaner design, until the end of the MR where state requests are made asynchronous and where the new information is used to decide whether to apply or delay client state updates.
I believe that the whole MR would fix the currently often failing d3d/ddraw tests, and more generally fix race conditions that happen with window state updates. I believe that it should also ultimately make it easier/safer to change the current design, to delay the client state updates a bit more and apply them outside of the driver ProcessEvent calls: tracking the pending and host states accurately and independently of the win32 state will let us decide what change needs to be requested to make them match, at any moment.
The latter would fix some existing bug where applications stop responding as they start a new message loop in response to SC_RESTORE commands, and as we do not process X11 events recursively.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6716
This completely refactors the winex11 window state tracking, keeping track of the desired/pending/current window state and config in a fully asynchronous way, and avoiding duplicate requests. I believe this mitigates various race conditions that we're suffering from, solving most spurious event feedback loops when the X11 state is being applied while some win32 state change is being requested, and fixing the spurious d3d/ddraw/user32 test failures.
--
v6: d3d9/tests: Remove now unnecesary d3d9ex todo_wine / flaky.
winex11: Try updating client window config on (_NET_)_WM_STATE updates.
winex11: Try updating client window state on ConfigureNotify.
winex11: Request only one _NET_WM_STATE bit change at a time.
winex11: Remove now unnecessary (net_)wm_state window members.
winex11: Get rid of the now unnecessary unmap_window helper.
winex11: Request window state updates asynchronously.
winex11: Try updating the client window state in net_wm_state_notify.
winex11: Request window config updates asynchronously.
winex11: Introduce a new window_update_client_config helper.
winex11: Simplify the control flow in ConfigureNotify handlers.
winex11: Introduce a new window_update_client_state helper.
winex11: Simplify the control flow in WM_STATE handlers.
winex11: Avoid updating _NET_WM_STATE on iconic windows.
winex11: Tweak the WM_TAKE_FOCUS event time to workaround a FVWM bug.
winex11: Ignore focus changes during WM_STATE updates.
winex11: Get rid of the now unnecessary mapped window data flag.
winex11: Use desired_state wm_state to decide of the mapped flag.
winex11: Call window_set_wm_state when unmapping embedded windows.
winex11: Get rid of the unnecessary net_wm_state window data member.
winex11: Get rid of the now unnecessary iconic window data flag.
winex11: Use pending_state wm_state to decide whether a window is currently iconic.
winex11: Use pending_state to decide whether to set fullscreen monitor property.
winex11: Use pending_state wm_state to decide if requests can be made directly.
winex11: Compute WM_STATE notify updates in term of style changes.
winex11: Compute ConfigureNotify updates in term of style changes.
winex11: Compute WindowPosChanged updates in term of style changes.
winex11: Avoid requesting unnecessary window config changes.
winex11: Avoid requesting unnecessary _NET_WM_STATE changes.
winex11: Track window config requests and updates.
winex11: Introduce a new window_set_config helper.
winex11: Track _NET_WM_STATE window property requests and updates.
winex11: Introduce a new window_set_net_wm_state helper.
winex11: Introduce a new window_set_wm_state helper.
winex11: Track _XEMBED_INFO window property changes.
winex11: Introduce a new window state tracker.
winex11: Move embedded check in update_net_wm_states / sync_window_style.
winex11: Move ConfigureNotify checks after computing visible rect.
winex11: Rename read_net_wm_state to get_window_net_wm_state.
winex11: Set configure_serial when resizing on display mode change.
winex11: Avoid processing RRNotify events in xrandr14_get_id.
d3d9/tests: Use static class for the dummy window.
d3d9/tests: Avoid creating visible windows concurrently.
wined3d: Check that format_id is >= 0 before assuming it's an index.
DEBUG: gitlab: Only build the last commit.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569
Instead of a single configure serial, which is simply not enough to
mitigate event feedback loops.
This should (hopefully) address the recent d3d8:device / d3d9:device
test failures on the Gitlab CI, without having to add more `flush_events`
calls to the tests.
I believe it should also provide a more general fix to this race condition
than the configure_serial mechanism.
--
v5: d3d9/tests: Remove now unnecesary d3d9ex todo_wine / flaky.
winex11: Try updating client window config on (_NET_)_WM_STATE updates.
winex11: Try updating client window state on ConfigureNotify.
winex11: Request only one _NET_WM_STATE bit change at a time.
winex11: Remove now unnecessary (net_)wm_state window members.
winex11: Get rid of the now unnecessary unmap_window helper.
winex11: Request window state updates asynchronously.
winex11: Try updating the client window state in net_wm_state_notify.
winex11: Request window config updates asynchronously.
winex11: Introduce a new window_update_client_config helper.
winex11: Simplify the control flow in ConfigureNotify handlers.
winex11: Introduce a new window_update_client_state helper.
winex11: Simplify the control flow in WM_STATE handlers.
winex11: Avoid updating _NET_WM_STATE on iconic windows.
winex11: Tweak the WM_TAKE_FOCUS event time to workaround a FVWM bug.
winex11: Ignore focus changes during WM_STATE updates.
winex11: Get rid of the now unnecessary mapped window data flag.
winex11: Use desired_state wm_state to decide of the mapped flag.
winex11: Call window_set_wm_state when unmapping embedded windows.
winex11: Get rid of the unnecessary net_wm_state window data member.
winex11: Get rid of the now unnecessary iconic window data flag.
winex11: Use pending_state wm_state to decide whether a window is currently iconic.
winex11: Use pending_state to decide whether to set fullscreen monitor property.
winex11: Use pending_state wm_state to decide if requests can be made directly.
winex11: Compute WM_STATE notify updates in term of style changes.
winex11: Compute ConfigureNotify updates in term of style changes.
winex11: Compute WindowPosChanged updates in term of style changes.
winex11: Avoid requesting unnecessary window config changes.
winex11: Avoid requesting unnecessary _NET_WM_STATE changes.
winex11: Track window config requests and updates.
winex11: Introduce a new window_set_config helper.
winex11: Track _NET_WM_STATE window property requests and updates.
winex11: Introduce a new window_set_net_wm_state helper.
winex11: Introduce a new window_set_wm_state helper.
winex11: Track _XEMBED_INFO window property changes.
winex11: Introduce a new window state tracker.
winex11: Move embedded check in update_net_wm_states / sync_window_style.
winex11: Move ConfigureNotify checks after computing visible rect.
winex11: Rename read_net_wm_state to get_window_net_wm_state.
winex11: Set configure_serial when resizing on display mode change.
winex11: Avoid processing RRNotify events in xrandr14_get_id.
d3d9/tests: Use static class for the dummy window.
d3d9/tests: Avoid creating visible windows concurrently.
wined3d: Check that format_id is >= 0 before assuming it's an index.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569
Micro-optimization works only in Debug build, therefore, it is more correct to name this code refactoring, in my GCC with -O2 flag it does not affect count and decrease cost per CPU clock cycle instructions generated in any way.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6709
This adds support for converting to different WIC formats, in one case to more closely match native d3dx9, and in the other to convert to a format that can actually be represented by d3d9.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6704
This is based on top of !6526, will mark ready after !6526 is merged.
--
v4: DEBUG the gitlab CI test failure.
propsys: Support converting to BSTR for PropVariantToVariant.
propsys: Use debugstr_variant for the trace in VariantToPropVariant.
propsys: Implement PropVariantToBSTR.
propsys/tests: Test truncating for PropVariantToString.
propsys/tests: Test PropVariantToBSTR.
propsys: Add PropVariantToBSTR stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6640