Module: wine Branch: master Commit: 5225aabd07010aa9fb11f7c490d63046ff178da5 URL: https://gitlab.winehq.org/wine/wine/-/commit/5225aabd07010aa9fb11f7c490d6304...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Dec 19 11:39:38 2022 +0100
hidclass.sys: Make sure a desktop is created for the driver process.
This was previously automatically done when user32 was loaded, but since the move of __wine_send_input to win32u, we do not need to load it any more. Make sure we have a desktop or WM_INPUT messages won't be sent by wineserver.
---
dlls/hidclass.sys/pnp.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index 46b6e803465..c0e2a874788 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -599,6 +599,10 @@ NTSTATUS WINAPI HidRegisterMinidriver(HID_MINIDRIVER_REGISTRATION *registration) { minidriver *driver;
+ /* make sure we have a window station and a desktop, we need one to send input */ + if (!GetProcessWindowStation()) + return STATUS_INVALID_PARAMETER; + if (!(driver = calloc(1, sizeof(*driver)))) return STATUS_NO_MEMORY;