From 4fa70d510c01e5dc9da045ad9383554d860d02a0 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 14 Aug 2023 09:05:36 +1000 Subject: [PATCH] Updated user32-rawinput-mouse patchset Fixes: https://bugs.winehq.org/show_bug.cgi?id=55085 Fixes: https://bugs.winehq.org/show_bug.cgi?id=55407 --- ...nex11-Fixup-virtual-windows-creation.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 patches/user32-rawinput-mouse/0009-winex11-Fixup-virtual-windows-creation.patch diff --git a/patches/user32-rawinput-mouse/0009-winex11-Fixup-virtual-windows-creation.patch b/patches/user32-rawinput-mouse/0009-winex11-Fixup-virtual-windows-creation.patch new file mode 100644 index 00000000..c34269c5 --- /dev/null +++ b/patches/user32-rawinput-mouse/0009-winex11-Fixup-virtual-windows-creation.patch @@ -0,0 +1,60 @@ +From 6071310090160f128f05b2ea8ef050e35170f037 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Aida=20Jonikien=C4=97?= +Date: Mon, 14 Aug 2023 08:52:55 +1000 +Subject: [PATCH] winex11: Fixup virtual windows creation + +--- + dlls/winex11.drv/window.c | 10 ++++++++-- + dlls/winex11.drv/x11drv_main.c | 2 +- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c +index 9d3afc8ed13..e008ec1a890 100644 +--- a/dlls/winex11.drv/window.c ++++ b/dlls/winex11.drv/window.c +@@ -1905,6 +1905,7 @@ static BOOL create_desktop_win_data( Window win, HWND hwnd ) + void X11DRV_SetDesktopWindow( HWND hwnd ) + { + unsigned int width, height; ++ Display *display; + + /* retrieve the real size of the desktop */ + SERVER_START_REQ( get_window_rectangles ) +@@ -1943,14 +1944,19 @@ void X11DRV_SetDesktopWindow( HWND hwnd ) + { + ERR( "Failed to create virtual desktop window data\n" ); + root_window = DefaultRootWindow( gdi_display ); ++ return; + } +- else if (is_desktop_fullscreen()) ++ ++ display = x11drv_thread_data()->display; ++ if (is_desktop_fullscreen()) + { +- Display *display = x11drv_thread_data()->display; + TRACE("setting desktop to fullscreen\n"); + XChangeProperty( display, root_window, x11drv_atom(_NET_WM_STATE), XA_ATOM, 32, PropModeReplace, + (unsigned char*)&x11drv_atom(_NET_WM_STATE_FULLSCREEN), 1 ); + } ++ ++ FIXME("Enabling xinput in desktop thread\n"); ++ x11drv_xinput_enable( display, DefaultRootWindow( display ), PointerMotionMask ); + } + else + { +diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c +index 26cf404731b..0dc350b3a1b 100644 +--- a/dlls/winex11.drv/x11drv_main.c ++++ b/dlls/winex11.drv/x11drv_main.c +@@ -881,7 +881,7 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) + if (use_xim) xim_thread_attach( data ); + + x11drv_xinput_init(); +- if (NtUserGetWindowThread( NtUserGetDesktopWindow(), NULL ) == GetCurrentThreadId()) ++ if (NtUserGetWindowThread( UlongToHandle( NtUserGetThreadInfo()->top_window ), NULL ) == GetCurrentThreadId()) + x11drv_xinput_enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); + + return data; +-- +2.40.1 +