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.
--
v7: winex11: Request window state updates asynchronously.
winex11: Update the window client config on window state changes.
winex11: Wait for pending ConfigureNotify before updating the client state.
winex11: Wait for pending _NET_WM_STATE before updating the client state.
winex11: Ignore focus changes during WM_STATE transitions.
winex11: Introduce a new window_update_client_config helper.
winex11: Introduce a new window_update_client_state helper.
winex11: Use the new window state tracker to get WM_STATE value.
winex11: Use the new window state tracker to get _NET_WM_STATE value.
d3d9/tests: Flush events after minimizing and restoring focus window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569
This is the current proton thread priority implementation by @rbernon rebased for upstream with a few `#ifdef`s added since AFAIK Linux is the only operating system where threads have a unique PID which can be used to set niceness on.
~~I also ran `./tools/make_requests` on https://gitlab.winehq.org/mzent/wine/-/commit/6705d3481be0409f7e971c1d2c7a3… as well and `autoconf` on https://gitlab.winehq.org/mzent/wine/-/commit/d7bafe40c411753662b2ad97148a6… (which does blow up the line count a bit).~~
A few tiny changes ~~(with the ready variable for example)~~ are in anticipation for Part 2, which also adds Mach thread priorities and recalculates thread priorities on process priority change.
Since this is a rather large MR, I hope the split here is appropriate ~~(with the second part being slightly smaller)~~, but I think logically it makes the most sense here.
--
v16: server: Check wineserver privileges on init with -20 niceness.
server: Use setpriority to update thread niceness when safe.
ntdll: Set RLIMIT_NICE to its hard limit.
server: Introduce new set_thread_priority helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4551
When WM_STATE is being quickly updated, and depending on the WM we might
receive transient focus changes, which will disrupt the Win32 state and
make us randomly lose focus.
Ignore them instead, when a window is being shown, and wait for WM_STATE
to be updated and stable. We will eventually receive a WM_TAKE_FOCUS /
FocusIn event *after* a window has been shown.
When a window is hidden or minimized, we will receive the FocusOut event
during the WM_STATE transition, and can safely handle it in this case,
as we should have done all the Win32 side effects and have changed the
foreground window already.
When there's no window state change pending, the focus change event is
unexpected, coming from the user or WM, and we handle it normally.
With the planned asynchronous state changes it will become more likely to
receive transient focus events, and we need to ignore any focus change that
is expected or known to be superseded.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6822
As far as I can tell, ime.h is only included by the x11 keyboard driver and `WM_IMEKEYDOWN` and `WM_IMEKEYUP` are not used there, so this change should only bring the naming convention in line with what is already in winuser and MSDN.
--
v3: winex11: Do not include ime.h.
include: Add Japanese IME virtual key codes to winuser.rh.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6819
As far as I can tell, ime.h is only included by the x11 keyboard driver and `WM_IMEKEYDOWN` and `WM_IMEKEYUP` are not used there, so this change should only bring the naming convention in line with what is already in winuser and MSDN.
--
v2: winex11: Do not include ime.h.
include: Add Japanese IME virtual key codes to winuser.rh.
https://gitlab.winehq.org/wine/wine/-/merge_requests/6819
As far as I can tell, ime.h is only included by the x11 keyboard driver and `WM_IMEKEYDOWN` and `WM_IMEKEYUP` are not used there, so this change should only bring the naming convention in line with what is already in winuser and MSDN.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6819
This is based on top of !6526, will mark ready after !6526 is merged.
--
v8: 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