Currently only used to keep rawinput devices updated without iterating the entire list on every change.
This thread will then let us solve several problems:
* Solve issues with input not being polled if/when applications aren't checking their messages. This removes the need for polling messages in DInput, which is known to confuse and break DOSBOX.
* Solve some issues with ll-hook deadlocks between hooking threads and the thread that is currently polling for inputs.
* Useful to process internal messages and implement some user driver mechanisms. It can for instance already process WM_WINE_CLIPCURSOR messages, instead of relying on the foreground thread.
* Similarly, for cursor icon changes, wineserver can notify it on cursor window changes and request the cursor icon to be updated from the user driver, instead of having to check the window the cursor is located in to change its icon on every mouse move.
* Ultimately make it possible to drop the __wine_send_input PE export, the thread can read HID reports from devices that a process has registered for, and send WM_INPUT messages accordingly. This has some drawbacks though, as reading NT devices currently involves much more wineserver roundtrips than `__wine_send_input`.
There's evidence that Windows uses a similar thread to process hardware events (as described in https://devblogs.microsoft.com/oldnewthing/20140213-00/?p=1773), although it's probably a system-wide kernel thread. I considered reading X11 input from a per-prefix dedicated thread (for instance in explorer.exe) or dedicated process, but having one thread per-process has several advantages.
The rawinput device registration state is done per-process and according to https://gitlab.winehq.org/wine/wine/-/merge_requests/2120 it also needs to post notifications that are process specific.
It also keeps the guarantee that each process will read the inputs from the window it has created, and not from some other windows, although the message dispatch may decide to send the message to another process later, it avoids having to listen to input on other processes windows.
It can then be seen as an intermediate step towards having a per-prefix thread, if that's something we end up needing. Moving from a per-process thread to a per-prefix thread should be easier.
--
v2: win32u: Keep rawinput device list updated using WM_DEVICECHANGE.
win32u: Register for device notifications in the rawinput thread.
win32u: Introduce a dedicated thread for rawinput processing.
ntdll/tests: Use combase instead of comctl32 as a test module.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3024
Validate user data before passing it to PolyDraw.
The program in the bug requests to draw figures outrageously outside the DC's region after presumably, some uninitialized values happen as a result of a missing font. Native gdiplus seems to handle this gracefully so we probably also should.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41617
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
--
v5: gdiplus: Clip polygons before drawing them
https://gitlab.winehq.org/wine/wine/-/merge_requests/3288
This fixes various problems I've run into while trying to use Fusion 360 in wine.
- stacking issues in unmanaged mode
- I also attempted to apply the same fix for managed mode, but it looks difficult to do this in a way that plays well with window managers; I think it's best left up to them to keep override_redirect windows at the top of the stack)
- when the window manager sets our state to withdrawn, tell the window that it's been minimized, since the semantics are very similar
- the last one is a hack because I don't really know what to do about it, when clicking on the floating popups, they gain focus, which causes wine to incorrectly make them managed and that breaks everything
--
v3: winex11: don't let captionless popups be managed
winex11: pass ICCCM withdrawn state as minimized
winex11: restack a window's owned popups above it
https://gitlab.winehq.org/wine/wine/-/merge_requests/2343
I have found some scripts where comparisons that use floats and OLECOLOR directly fail. For example:
```
If Light005.State Then
' State is a float V_R4
End If
If Light005.Colorfull Then
' Colorfull is an OLECOLOR VT_UI4
End If
```
This is because `stack_pop_bool` does not handle `VT_R4` and `VT_UI4` and returns `E_NOTIMPL`.
This adds additional types to `stack_pop_bool` similar to `VARIANT_Coerce`.
Fixes https://bugs.winehq.org/show_bug.cgi?id=54731
--
v4: vbscript: Coerce to VT_BOOL when evaluating jump conditions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2507