From b3ddd984424a437de2d14b7b5c80db9d8ac47fc568e1d31c2250e3310bb6a75b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 24 Apr 2021 08:40:49 +0000 Subject: [PATCH 1/8] - updated to 6.7 development release - NetApi32, WLDAP32, and Kerberos libraries converted to PE. - More Media Foundation work. - ES6 JavaScript mode. - Improved WOW64 file system redirection. - More Plug & Play driver support. - Keyboard raw input device. - Various bug fixes. - update staging to 6.7 release - removed wine-winegcc-missing-includes.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=819 --- _service | 2 +- wine-6.7.tar.xz | 3 +++ wine-6.7.tar.xz.sign | 16 ++++++++++++++++ wine-staging-6.7.tar.xz | 3 +++ wine.changes | 14 ++++++++++++++ wine.spec | 6 +++--- 6 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 wine-6.7.tar.xz create mode 100644 wine-6.7.tar.xz.sign create mode 100644 wine-staging-6.7.tar.xz diff --git a/_service b/_service index 7a54a75..75c1419 100644 --- a/_service +++ b/_service @@ -3,7 +3,7 @@ @PARENT_TAG@ v(.*) https://github.com/wine-staging/wine-staging.git - refs/tags/v6.6 + refs/tags/v6.7 v*.* git diff --git a/wine-6.7.tar.xz b/wine-6.7.tar.xz new file mode 100644 index 0000000..e78fb71 --- /dev/null +++ b/wine-6.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c30514b7761d4611514ae021cb1e354128d77eff54a283f1401ee702277bbea4 +size 24449368 diff --git a/wine-6.7.tar.xz.sign b/wine-6.7.tar.xz.sign new file mode 100644 index 0000000..cff4b83 --- /dev/null +++ b/wine-6.7.tar.xz.sign @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAmCDK+UACgkQzvrI6q8X +UZ0pahAAijLJWiUMykaS1+lKBYsNbZFcUuiJcriwBatngi78GknnI2S6EV2BT5SM +nuYRJ9dL7owRfMjVPEe79V4jWzXI+9m9W0gTyGdZTOj9b9Zu28j22WQAWejsFIpw +sO0NO+rhdt5Twnzm+keG+yTEmwZ21MYV+C6DqYn938XPWGHW9l5+Z2a9uHGl0u/P +/twrJQg0Sh9AOP8mETYR3MMDK4wiAnG8qaGWRx2Iq6VtJb9dNQ52YYAGLefWutuv +S6RgWHiw2iuGjBp92cwSo1lI2ppjMbcSfhWVlPzLCs1uFJlh+k39tKsTgCazNoDY +gkOnWol2u3c9xY7ACnb4DA6GJk2Wdr+HMIYPjIsc6M4utSqBhaeYE6eZ0xX8xoKo +tjdWzJm0Sm114bwrt0R8P7iDojAYz4VjwC+oE95n9lXLtopdGsa2iw4lx9gtoanA ++/s+JkZUObbEojUdVR3tfFfe+JHuX/nucJCQeBQnq5dkh4fKCgTR4KcNyyvO9quX +BSH6+YTCF6VopOCjVNdihV3YmLndP9S4hs6fv/+b1olkVkBnkpDNCvIY5cZkRxK2 +MIiIl0WTyQadUk21roYeYkbO/Yf88bSWO+XeE5sYO3FI+d16LVXKJLlL/cfp9VBR +H7HfrvwAJ3wEPFfDAb0iD/SO3wwFLvrxPvHxb26O/6NPOxW32IU= +=MUKO +-----END PGP SIGNATURE----- diff --git a/wine-staging-6.7.tar.xz b/wine-staging-6.7.tar.xz new file mode 100644 index 0000000..07796ac --- /dev/null +++ b/wine-staging-6.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bd2d6e88c2e34eea52393cba52afe605bb42047fe38cf7a378923875a8bf5071 +size 7374208 diff --git a/wine.changes b/wine.changes index c35cf2b..add6b83 100644 --- a/wine.changes +++ b/wine.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sat Apr 24 08:16:43 UTC 2021 - Marcus Meissner + +- updated to 6.7 development release + - NetApi32, WLDAP32, and Kerberos libraries converted to PE. + - More Media Foundation work. + - ES6 JavaScript mode. + - Improved WOW64 file system redirection. + - More Plug & Play driver support. + - Keyboard raw input device. + - Various bug fixes. +- update staging to 6.7 release +- removed wine-winegcc-missing-includes.patch (upstream) + ------------------------------------------------------------------- Wed Apr 21 14:21:30 UTC 2021 - Marcus Rueckert diff --git a/wine.spec b/wine.spec index afb30fc..48e9045 100644 --- a/wine.spec +++ b/wine.spec @@ -29,8 +29,8 @@ %endif # needs to be on top due to usage of %version macro below -%define realver 6.6 -Version: 6.6 +%define realver 6.7 +Version: 6.7 Release: 0 %if "%{flavor}" != "" @@ -161,7 +161,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %{ix86} x86_64 ppc armv7l armv7hl aarch64 %if %{staging} # upstream patch target version -%define staging_version 6.6 +%define staging_version 6.7 Source100: wine-staging-%{staging_version}.tar.xz BuildRequires: gtk3-devel BuildRequires: libOSMesa-devel From 5ee6e69ae66c4021b20ec77bc183551021bbfe599a7d23520d7540c7c7fa0913 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 24 Apr 2021 08:40:58 +0000 Subject: [PATCH 2/8] OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=820 --- wine-6.6.tar.xz | 3 --- wine-6.6.tar.xz.sign | 16 ---------------- wine-staging-6.6.tar.xz | 3 --- 3 files changed, 22 deletions(-) delete mode 100644 wine-6.6.tar.xz delete mode 100644 wine-6.6.tar.xz.sign delete mode 100644 wine-staging-6.6.tar.xz diff --git a/wine-6.6.tar.xz b/wine-6.6.tar.xz deleted file mode 100644 index 28b7b93..0000000 --- a/wine-6.6.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99e522c6dcc0ac1d53d201bf3054891fdf11864257473c3eb341e37671fd84ad -size 24400568 diff --git a/wine-6.6.tar.xz.sign b/wine-6.6.tar.xz.sign deleted file mode 100644 index 841967e..0000000 --- a/wine-6.6.tar.xz.sign +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEE2iNXmnTUrZr50/lFzvrI6q8XUZ0FAmBwsJQACgkQzvrI6q8X -UZ1iEg//ccIpAOAz8RLeiM9ccob9B7Ix0P/DPBqmpejrkO+3Ui9ZGPJUEDT9rSVb -2qNkyRppECC5IGOuZKYWTuQ5sg27zysyhyK5nPOKUa7l8ck224lojiaGL4aOZ3/f -2J/+nqjVkdKfoLTjdl3VGAGjWvpGw2JSF6mUMMKXFh+w/nHIQfdw+U0yH3Q3sBvY -pijMQwAOB/z8KAW/XMk+ykeUl2bfJFNpRPSmTYRI0NqHArfT2k5EeYib/LirPUGS -jSPEGYXcxfnsKzMiIXxZP9c0D2lq71/b09YXvO8SewKnOIqhYUdNDZFXVa0aWYkN -63MkBjbYI4vlal+UsgBIanozLHp8iLj10VLRgWHFKuACx5Ab2aaxIM/LNyU8Vc1p -X6Feb7H2tnO5GI4HIW5K+WKUBpQ5smKeaU1rpMjFsuqA+7H0SLXb2+YfePQqMMa7 -TEJkcIkjvUDxAupF7JilUiBzFZzpFy+M8xnaeGdTrzdZcSIA42PdSf5Qgyv2YocS -HOtPpHrXVqkkD9BlSs0+2SQJYs5kUxnpGWIyhq4gnirx7Z/1O4+31DsD1rODyZ1X -gUQ3BlrbUYdhM0+wFpturKXzGtwqJQMU8jJUep9vqRJO1o6sSlJmok5oHvcpFj7Z -z+G4RMOSyokk45PmOSyt69zngB8bV39KpzRyasKcPhP+ipQ4reo= -=CBY+ ------END PGP SIGNATURE----- diff --git a/wine-staging-6.6.tar.xz b/wine-staging-6.6.tar.xz deleted file mode 100644 index 5ec1560..0000000 --- a/wine-staging-6.6.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a6a32baafa1b870e6319c9c2e25147ccab08e2385f639c558899527a89c7880 -size 7396636 From 38634e1c6780e0d153d7c6abd07bce946aeb08c4214ad3636b74c01b58705ef6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 24 Apr 2021 11:09:34 +0000 Subject: [PATCH 3/8] OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=821 --- wine.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/wine.spec b/wine.spec index 48e9045..9135cb8 100644 --- a/wine.spec +++ b/wine.spec @@ -137,8 +137,6 @@ Source6: wine-msi.desktop Source5: ubuntuwine.tar.bz2 Source7: baselibs.conf Source8: wine-rpmlintrc -# PATCH FIX UPSTREAM wine-winegcc-missing-includes.patch fix https://bugs.winehq.org/show_bug.cgi?id=50996 -Patch0: wine-winegcc-missing-includes.patch # SUSE specific patches # - currently none, but add them here #Patch0: susefixes.patch From 4552734d497b499202466c694e19c0171d16f26669d8c85503d6d779c401450a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 24 Apr 2021 11:17:13 +0000 Subject: [PATCH 4/8] - removed 0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=822 --- wine.changes | 1 + wine.spec | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/wine.changes b/wine.changes index add6b83..42d5748 100644 --- a/wine.changes +++ b/wine.changes @@ -11,6 +11,7 @@ Sat Apr 24 08:16:43 UTC 2021 - Marcus Meissner - Various bug fixes. - update staging to 6.7 release - removed wine-winegcc-missing-includes.patch (upstream) +- removed 0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch ------------------------------------------------------------------- Wed Apr 21 14:21:30 UTC 2021 - Marcus Rueckert diff --git a/wine.spec b/wine.spec index 9135cb8..836a6bf 100644 --- a/wine.spec +++ b/wine.spec @@ -140,7 +140,6 @@ Source8: wine-rpmlintrc # SUSE specific patches # - currently none, but add them here #Patch0: susefixes.patch -Source99: a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch Recommends: wine-gecko >= 2.47.2 Conflicts: wine-gecko < 2.47.2 Recommends: wine-mono >= 6.1.1 @@ -224,7 +223,6 @@ cp %{S:3} . %if %{staging} # apply wine staging patch set on top of the wine release. tar xf %{SOURCE100} -cp %{SOURCE99} ./wine-staging-%staging_version/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch bash ./wine-staging-%staging_version/patches/patchinstall.sh --all %endif From e2c9d7e1862751f8753cc0cb1e87c2c080c0e23a865994c48bf5a288995ff344 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 24 Apr 2021 11:17:32 +0000 Subject: [PATCH 5/8] - removed a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=823 --- ...228fbcefe7b8de06d2dd7182272df6cc3c36.patch | 267 ------------------ wine.changes | 2 +- 2 files changed, 1 insertion(+), 268 deletions(-) delete mode 100644 a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch diff --git a/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch b/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch deleted file mode 100644 index e6080ba..0000000 --- a/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch +++ /dev/null @@ -1,267 +0,0 @@ -From 22846605056d89063ec4c78b353f48d76b39b41f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Bernon?= -Date: Thu, 25 Mar 2021 16:12:58 +0100 -Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the - desktop thread. - -We still need to send "normal" input from the clipping window thread -to trigger low-level hooks callbacks when clipping cursor. This is for -instance used in our dinput implementation. ---- - dlls/winex11.drv/event.c | 10 ++- - dlls/winex11.drv/mouse.c | 107 ++++++++++++++++++++++++++++++--- - dlls/winex11.drv/x11drv.h | 1 + - dlls/winex11.drv/x11drv_main.c | 4 ++ - 4 files changed, 111 insertions(+), 11 deletions(-) - -diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c -index 217c1eca857..8685ce9536b 100644 ---- a/dlls/winex11.drv/event.c -+++ b/dlls/winex11.drv/event.c -@@ -328,6 +328,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE - */ - static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) - { -+#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H -+ struct x11drv_thread_data *thread_data = x11drv_thread_data(); -+#endif -+ - switch (prev->type) - { - case ConfigureNotify: -@@ -359,19 +363,21 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) - case GenericEvent: - if (next->xcookie.extension != xinput2_opcode) break; - if (next->xcookie.evtype != XI_RawMotion) break; -- if (x11drv_thread_data()->warp_serial) break; -+ if (thread_data->xi2_rawinput_only) break; -+ if (thread_data->warp_serial) break; - return MERGE_KEEP; - } - break; - case GenericEvent: - if (prev->xcookie.extension != xinput2_opcode) break; - if (prev->xcookie.evtype != XI_RawMotion) break; -+ if (thread_data->xi2_rawinput_only) break; - switch (next->type) - { - case GenericEvent: - if (next->xcookie.extension != xinput2_opcode) break; - if (next->xcookie.evtype != XI_RawMotion) break; -- if (x11drv_thread_data()->warp_serial) break; -+ if (thread_data->warp_serial) break; - return merge_raw_motion_events( prev->xcookie.data, next->xcookie.data ); - #endif - } -diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 6b6512521f4..0558467a805 100644 ---- a/dlls/winex11.drv/mouse.c -+++ b/dlls/winex11.drv/mouse.c -@@ -422,7 +422,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask ) - memset( mask_bits, 0, sizeof(mask_bits) ); - XISetMask( mask_bits, XI_DeviceChanged ); - XISetMask( mask_bits, XI_RawMotion ); -- XISetMask( mask_bits, XI_ButtonPress ); -+ -+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) -+ { -+ XISetMask( mask_bits, XI_RawButtonPress ); -+ XISetMask( mask_bits, XI_RawButtonRelease ); -+ data->xi2_rawinput_only = TRUE; -+ } -+ else -+ { -+ XISetMask( mask_bits, XI_ButtonPress ); -+ data->xi2_rawinput_only = FALSE; -+ } - - pXISelectEvents( display, DefaultRootWindow( display ), &mask, 1 ); - -@@ -748,7 +759,6 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x - static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPUT *input ) - { - struct x11drv_win_data *data; -- RAWINPUT rawinput; - - input->type = INPUT_MOUSE; - -@@ -765,7 +775,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU - sync_window_cursor( window ); - last_cursor_change = input->u.mi.time; - } -- __wine_send_input( hwnd, input, &rawinput ); -+ __wine_send_input( hwnd, input, NULL ); - return; - } - -@@ -805,7 +815,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU - SERVER_END_REQ; - } - -- __wine_send_input( hwnd, input, &rawinput ); -+ __wine_send_input( hwnd, input, NULL ); - } - - #ifdef SONAME_LIBXCURSOR -@@ -1760,7 +1770,6 @@ void move_resize_window( HWND hwnd, int dir ) - { - MSG msg; - INPUT input; -- RAWINPUT rawinput; - int x, y, rootX, rootY; - - if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break; -@@ -1776,7 +1785,7 @@ void move_resize_window( HWND hwnd, int dir ) - input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; - input.u.mi.time = GetTickCount(); - input.u.mi.dwExtraInfo = 0; -- __wine_send_input( hwnd, &input, &rawinput ); -+ __wine_send_input( hwnd, &input, NULL ); - } - - while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE )) -@@ -1952,6 +1961,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - x_rel = &thread_data->x_rel_valuator; - y_rel = &thread_data->y_rel_valuator; - -+ input.type = INPUT_MOUSE; - input.u.mi.mouseData = 0; - input.u.mi.dwFlags = MOUSEEVENTF_MOVE; - input.u.mi.time = EVENT_x11_time_to_win32_time( event->time ); -@@ -1987,10 +1997,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - return FALSE; - } - -- TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); -+ if (!thread_data->xi2_rawinput_only) -+ { -+ TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); -+ __wine_send_input( 0, &input, NULL ); -+ } -+ else -+ { -+ TRACE( "raw pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); - -- input.type = INPUT_MOUSE; -- __wine_send_input( 0, &input, &rawinput ); -+ rawinput.header.dwType = RIM_TYPEMOUSE; -+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); -+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ -+ rawinput.header.wParam = RIM_INPUT; -+ rawinput.data.mouse.ulRawButtons = input.u.mi.dwFlags; -+ rawinput.data.mouse.u.ulButtons = input.u.mi.mouseData; -+ rawinput.data.mouse.lLastX = input.u.mi.dx; -+ rawinput.data.mouse.lLastY = input.u.mi.dy; -+ rawinput.data.mouse.ulExtraInformation = 0; -+ -+ input.type = INPUT_HARDWARE; -+ input.u.hi.uMsg = WM_INPUT; -+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16); -+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0); -+ if (rawinput.data.mouse.lLastX || rawinput.data.mouse.lLastY) -+ __wine_send_input( 0, &input, &rawinput ); -+ } -+ return TRUE; -+} -+ -+/*********************************************************************** -+ * X11DRV_RawButtonEvent -+ */ -+static BOOL X11DRV_RawButtonEvent( XGenericEventCookie *cookie ) -+{ -+ struct x11drv_thread_data *thread_data = x11drv_thread_data(); -+ XIRawEvent *event = cookie->data; -+ int button = event->detail - 1; -+ RAWINPUT rawinput; -+ INPUT input; -+ -+ if (!device_mapping || device_mapping->deviceid != event->sourceid) -+ update_device_mapping( event->display, event->sourceid ); -+ -+ if (button >= 0 && device_mapping) -+ button = device_mapping->buttons[button] - 1; -+ -+ if (button >= 0 && pointer_mapping) -+ button = pointer_mapping->buttons[button] - 1; -+ -+ if (button < 0 || button >= NB_BUTTONS) return FALSE; -+ if (thread_data->xi2_state != xi_enabled) return FALSE; -+ if (event->deviceid != thread_data->xi2_core_pointer) return FALSE; -+ -+ TRACE( "raw button %u (raw: %u) %s\n", button, event->detail, event->evtype == XI_RawButtonRelease ? "up" : "down" ); -+ -+ rawinput.header.dwType = RIM_TYPEMOUSE; -+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); -+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ -+ rawinput.header.wParam = RIM_INPUT; -+ if (event->evtype == XI_RawButtonRelease) -+ { -+ rawinput.data.mouse.ulRawButtons = button_up_flags[button]; -+ rawinput.data.mouse.u.ulButtons = button_up_data[button]; -+ } -+ else -+ { -+ rawinput.data.mouse.ulRawButtons = button_down_flags[button]; -+ rawinput.data.mouse.u.ulButtons = button_down_data[button]; -+ } -+ rawinput.data.mouse.lLastX = 0; -+ rawinput.data.mouse.lLastY = 0; -+ rawinput.data.mouse.ulExtraInformation = 0; -+ -+ input.type = INPUT_HARDWARE; -+ input.u.hi.uMsg = WM_INPUT; -+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16); -+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0); -+ if (rawinput.data.mouse.ulRawButtons || rawinput.data.mouse.u.ulButtons) -+ __wine_send_input( 0, &input, &rawinput ); - return TRUE; - } - -@@ -2066,6 +2151,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) - case XI_RawMotion: - ret = X11DRV_RawMotion( event ); - break; -+ case XI_RawButtonPress: -+ case XI_RawButtonRelease: -+ ret = X11DRV_RawButtonEvent( event ); -+ break; - - default: - TRACE( "Unhandled event %#x\n", event->evtype ); -diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index afa990b7e68..910a6c6cc18 100644 ---- a/dlls/winex11.drv/x11drv.h -+++ b/dlls/winex11.drv/x11drv.h -@@ -353,6 +353,7 @@ struct x11drv_thread_data - struct x11drv_valuator_data x_rel_valuator; - struct x11drv_valuator_data y_rel_valuator; - int xi2_core_pointer; /* XInput2 core pointer id */ -+ int xi2_rawinput_only; - }; - - extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN; -diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index d8576949aea..c16825751c8 100644 ---- a/dlls/winex11.drv/x11drv_main.c -+++ b/dlls/winex11.drv/x11drv_main.c -@@ -633,6 +633,8 @@ void CDECL X11DRV_ThreadDetach(void) - - if (data) - { -+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) -+ x11drv_xinput_disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); - if (data->xim) XCloseIM( data->xim ); - if (data->font_set) XFreeFontSet( data->display, data->font_set ); - XCloseDisplay( data->display ); -@@ -704,6 +706,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) - if (use_xim) X11DRV_SetupXIM(); - - x11drv_xinput_init(); -+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) -+ x11drv_xinput_enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); - - return data; - } --- -2.30.2 - diff --git a/wine.changes b/wine.changes index 42d5748..0403594 100644 --- a/wine.changes +++ b/wine.changes @@ -11,7 +11,7 @@ Sat Apr 24 08:16:43 UTC 2021 - Marcus Meissner - Various bug fixes. - update staging to 6.7 release - removed wine-winegcc-missing-includes.patch (upstream) -- removed 0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch +- removed a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch (upstream) ------------------------------------------------------------------- Wed Apr 21 14:21:30 UTC 2021 - Marcus Rueckert From 5349171f0512b9d7b34ddc5bf9345d324ece1c118fa1b1781114b2323afe8854 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Sat, 24 Apr 2021 21:09:12 +0000 Subject: [PATCH 6/8] Updating link to change in openSUSE:Factory/wine revision 338.0 OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=ede3cab596ca072162c347d9c801d535 --- ...228fbcefe7b8de06d2dd7182272df6cc3c36.patch | 267 ++++++++++++++++++ wine.spec | 2 + 2 files changed, 269 insertions(+) create mode 100644 a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch diff --git a/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch b/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch new file mode 100644 index 0000000..e6080ba --- /dev/null +++ b/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch @@ -0,0 +1,267 @@ +From 22846605056d89063ec4c78b353f48d76b39b41f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Bernon?= +Date: Thu, 25 Mar 2021 16:12:58 +0100 +Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the + desktop thread. + +We still need to send "normal" input from the clipping window thread +to trigger low-level hooks callbacks when clipping cursor. This is for +instance used in our dinput implementation. +--- + dlls/winex11.drv/event.c | 10 ++- + dlls/winex11.drv/mouse.c | 107 ++++++++++++++++++++++++++++++--- + dlls/winex11.drv/x11drv.h | 1 + + dlls/winex11.drv/x11drv_main.c | 4 ++ + 4 files changed, 111 insertions(+), 11 deletions(-) + +diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c +index 217c1eca857..8685ce9536b 100644 +--- a/dlls/winex11.drv/event.c ++++ b/dlls/winex11.drv/event.c +@@ -328,6 +328,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE + */ + static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) + { ++#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H ++ struct x11drv_thread_data *thread_data = x11drv_thread_data(); ++#endif ++ + switch (prev->type) + { + case ConfigureNotify: +@@ -359,19 +363,21 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) + case GenericEvent: + if (next->xcookie.extension != xinput2_opcode) break; + if (next->xcookie.evtype != XI_RawMotion) break; +- if (x11drv_thread_data()->warp_serial) break; ++ if (thread_data->xi2_rawinput_only) break; ++ if (thread_data->warp_serial) break; + return MERGE_KEEP; + } + break; + case GenericEvent: + if (prev->xcookie.extension != xinput2_opcode) break; + if (prev->xcookie.evtype != XI_RawMotion) break; ++ if (thread_data->xi2_rawinput_only) break; + switch (next->type) + { + case GenericEvent: + if (next->xcookie.extension != xinput2_opcode) break; + if (next->xcookie.evtype != XI_RawMotion) break; +- if (x11drv_thread_data()->warp_serial) break; ++ if (thread_data->warp_serial) break; + return merge_raw_motion_events( prev->xcookie.data, next->xcookie.data ); + #endif + } +diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c +index 6b6512521f4..0558467a805 100644 +--- a/dlls/winex11.drv/mouse.c ++++ b/dlls/winex11.drv/mouse.c +@@ -422,7 +422,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask ) + memset( mask_bits, 0, sizeof(mask_bits) ); + XISetMask( mask_bits, XI_DeviceChanged ); + XISetMask( mask_bits, XI_RawMotion ); +- XISetMask( mask_bits, XI_ButtonPress ); ++ ++ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) ++ { ++ XISetMask( mask_bits, XI_RawButtonPress ); ++ XISetMask( mask_bits, XI_RawButtonRelease ); ++ data->xi2_rawinput_only = TRUE; ++ } ++ else ++ { ++ XISetMask( mask_bits, XI_ButtonPress ); ++ data->xi2_rawinput_only = FALSE; ++ } + + pXISelectEvents( display, DefaultRootWindow( display ), &mask, 1 ); + +@@ -748,7 +759,6 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x + static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPUT *input ) + { + struct x11drv_win_data *data; +- RAWINPUT rawinput; + + input->type = INPUT_MOUSE; + +@@ -765,7 +775,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU + sync_window_cursor( window ); + last_cursor_change = input->u.mi.time; + } +- __wine_send_input( hwnd, input, &rawinput ); ++ __wine_send_input( hwnd, input, NULL ); + return; + } + +@@ -805,7 +815,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU + SERVER_END_REQ; + } + +- __wine_send_input( hwnd, input, &rawinput ); ++ __wine_send_input( hwnd, input, NULL ); + } + + #ifdef SONAME_LIBXCURSOR +@@ -1760,7 +1770,6 @@ void move_resize_window( HWND hwnd, int dir ) + { + MSG msg; + INPUT input; +- RAWINPUT rawinput; + int x, y, rootX, rootY; + + if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break; +@@ -1776,7 +1785,7 @@ void move_resize_window( HWND hwnd, int dir ) + input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; + input.u.mi.time = GetTickCount(); + input.u.mi.dwExtraInfo = 0; +- __wine_send_input( hwnd, &input, &rawinput ); ++ __wine_send_input( hwnd, &input, NULL ); + } + + while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE )) +@@ -1952,6 +1961,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) + x_rel = &thread_data->x_rel_valuator; + y_rel = &thread_data->y_rel_valuator; + ++ input.type = INPUT_MOUSE; + input.u.mi.mouseData = 0; + input.u.mi.dwFlags = MOUSEEVENTF_MOVE; + input.u.mi.time = EVENT_x11_time_to_win32_time( event->time ); +@@ -1987,10 +1997,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) + return FALSE; + } + +- TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); ++ if (!thread_data->xi2_rawinput_only) ++ { ++ TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); ++ __wine_send_input( 0, &input, NULL ); ++ } ++ else ++ { ++ TRACE( "raw pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); + +- input.type = INPUT_MOUSE; +- __wine_send_input( 0, &input, &rawinput ); ++ rawinput.header.dwType = RIM_TYPEMOUSE; ++ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); ++ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ ++ rawinput.header.wParam = RIM_INPUT; ++ rawinput.data.mouse.ulRawButtons = input.u.mi.dwFlags; ++ rawinput.data.mouse.u.ulButtons = input.u.mi.mouseData; ++ rawinput.data.mouse.lLastX = input.u.mi.dx; ++ rawinput.data.mouse.lLastY = input.u.mi.dy; ++ rawinput.data.mouse.ulExtraInformation = 0; ++ ++ input.type = INPUT_HARDWARE; ++ input.u.hi.uMsg = WM_INPUT; ++ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16); ++ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0); ++ if (rawinput.data.mouse.lLastX || rawinput.data.mouse.lLastY) ++ __wine_send_input( 0, &input, &rawinput ); ++ } ++ return TRUE; ++} ++ ++/*********************************************************************** ++ * X11DRV_RawButtonEvent ++ */ ++static BOOL X11DRV_RawButtonEvent( XGenericEventCookie *cookie ) ++{ ++ struct x11drv_thread_data *thread_data = x11drv_thread_data(); ++ XIRawEvent *event = cookie->data; ++ int button = event->detail - 1; ++ RAWINPUT rawinput; ++ INPUT input; ++ ++ if (!device_mapping || device_mapping->deviceid != event->sourceid) ++ update_device_mapping( event->display, event->sourceid ); ++ ++ if (button >= 0 && device_mapping) ++ button = device_mapping->buttons[button] - 1; ++ ++ if (button >= 0 && pointer_mapping) ++ button = pointer_mapping->buttons[button] - 1; ++ ++ if (button < 0 || button >= NB_BUTTONS) return FALSE; ++ if (thread_data->xi2_state != xi_enabled) return FALSE; ++ if (event->deviceid != thread_data->xi2_core_pointer) return FALSE; ++ ++ TRACE( "raw button %u (raw: %u) %s\n", button, event->detail, event->evtype == XI_RawButtonRelease ? "up" : "down" ); ++ ++ rawinput.header.dwType = RIM_TYPEMOUSE; ++ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); ++ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ ++ rawinput.header.wParam = RIM_INPUT; ++ if (event->evtype == XI_RawButtonRelease) ++ { ++ rawinput.data.mouse.ulRawButtons = button_up_flags[button]; ++ rawinput.data.mouse.u.ulButtons = button_up_data[button]; ++ } ++ else ++ { ++ rawinput.data.mouse.ulRawButtons = button_down_flags[button]; ++ rawinput.data.mouse.u.ulButtons = button_down_data[button]; ++ } ++ rawinput.data.mouse.lLastX = 0; ++ rawinput.data.mouse.lLastY = 0; ++ rawinput.data.mouse.ulExtraInformation = 0; ++ ++ input.type = INPUT_HARDWARE; ++ input.u.hi.uMsg = WM_INPUT; ++ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16); ++ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0); ++ if (rawinput.data.mouse.ulRawButtons || rawinput.data.mouse.u.ulButtons) ++ __wine_send_input( 0, &input, &rawinput ); + return TRUE; + } + +@@ -2066,6 +2151,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) + case XI_RawMotion: + ret = X11DRV_RawMotion( event ); + break; ++ case XI_RawButtonPress: ++ case XI_RawButtonRelease: ++ ret = X11DRV_RawButtonEvent( event ); ++ break; + + default: + TRACE( "Unhandled event %#x\n", event->evtype ); +diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h +index afa990b7e68..910a6c6cc18 100644 +--- a/dlls/winex11.drv/x11drv.h ++++ b/dlls/winex11.drv/x11drv.h +@@ -353,6 +353,7 @@ struct x11drv_thread_data + struct x11drv_valuator_data x_rel_valuator; + struct x11drv_valuator_data y_rel_valuator; + int xi2_core_pointer; /* XInput2 core pointer id */ ++ int xi2_rawinput_only; + }; + + extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN; +diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c +index d8576949aea..c16825751c8 100644 +--- a/dlls/winex11.drv/x11drv_main.c ++++ b/dlls/winex11.drv/x11drv_main.c +@@ -633,6 +633,8 @@ void CDECL X11DRV_ThreadDetach(void) + + if (data) + { ++ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) ++ x11drv_xinput_disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); + if (data->xim) XCloseIM( data->xim ); + if (data->font_set) XFreeFontSet( data->display, data->font_set ); + XCloseDisplay( data->display ); +@@ -704,6 +706,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) + if (use_xim) X11DRV_SetupXIM(); + + x11drv_xinput_init(); ++ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) ++ x11drv_xinput_enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); + + return data; + } +-- +2.30.2 + diff --git a/wine.spec b/wine.spec index 836a6bf..9135cb8 100644 --- a/wine.spec +++ b/wine.spec @@ -140,6 +140,7 @@ Source8: wine-rpmlintrc # SUSE specific patches # - currently none, but add them here #Patch0: susefixes.patch +Source99: a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch Recommends: wine-gecko >= 2.47.2 Conflicts: wine-gecko < 2.47.2 Recommends: wine-mono >= 6.1.1 @@ -223,6 +224,7 @@ cp %{S:3} . %if %{staging} # apply wine staging patch set on top of the wine release. tar xf %{SOURCE100} +cp %{SOURCE99} ./wine-staging-%staging_version/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch bash ./wine-staging-%staging_version/patches/patchinstall.sh --all %endif From 26a446bd4f59be6ad7fe4b8bd0b337ac09ace673c511055a04e928beb722cab5 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Sat, 24 Apr 2021 21:09:12 +0000 Subject: [PATCH 7/8] Accepting request 888158 from Emulators baserev update by copy to link target OBS-URL: https://build.opensuse.org/request/show/888158 OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=824 --- ...228fbcefe7b8de06d2dd7182272df6cc3c36.patch | 267 ------------------ wine.spec | 2 - 2 files changed, 269 deletions(-) delete mode 100644 a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch diff --git a/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch b/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch deleted file mode 100644 index e6080ba..0000000 --- a/a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch +++ /dev/null @@ -1,267 +0,0 @@ -From 22846605056d89063ec4c78b353f48d76b39b41f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Bernon?= -Date: Thu, 25 Mar 2021 16:12:58 +0100 -Subject: [PATCH] winex11.drv: Listen to RawMotion and RawButton* events in the - desktop thread. - -We still need to send "normal" input from the clipping window thread -to trigger low-level hooks callbacks when clipping cursor. This is for -instance used in our dinput implementation. ---- - dlls/winex11.drv/event.c | 10 ++- - dlls/winex11.drv/mouse.c | 107 ++++++++++++++++++++++++++++++--- - dlls/winex11.drv/x11drv.h | 1 + - dlls/winex11.drv/x11drv_main.c | 4 ++ - 4 files changed, 111 insertions(+), 11 deletions(-) - -diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c -index 217c1eca857..8685ce9536b 100644 ---- a/dlls/winex11.drv/event.c -+++ b/dlls/winex11.drv/event.c -@@ -328,6 +328,10 @@ static enum event_merge_action merge_raw_motion_events( XIRawEvent *prev, XIRawE - */ - static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) - { -+#ifdef HAVE_X11_EXTENSIONS_XINPUT2_H -+ struct x11drv_thread_data *thread_data = x11drv_thread_data(); -+#endif -+ - switch (prev->type) - { - case ConfigureNotify: -@@ -359,19 +363,21 @@ static enum event_merge_action merge_events( XEvent *prev, XEvent *next ) - case GenericEvent: - if (next->xcookie.extension != xinput2_opcode) break; - if (next->xcookie.evtype != XI_RawMotion) break; -- if (x11drv_thread_data()->warp_serial) break; -+ if (thread_data->xi2_rawinput_only) break; -+ if (thread_data->warp_serial) break; - return MERGE_KEEP; - } - break; - case GenericEvent: - if (prev->xcookie.extension != xinput2_opcode) break; - if (prev->xcookie.evtype != XI_RawMotion) break; -+ if (thread_data->xi2_rawinput_only) break; - switch (next->type) - { - case GenericEvent: - if (next->xcookie.extension != xinput2_opcode) break; - if (next->xcookie.evtype != XI_RawMotion) break; -- if (x11drv_thread_data()->warp_serial) break; -+ if (thread_data->warp_serial) break; - return merge_raw_motion_events( prev->xcookie.data, next->xcookie.data ); - #endif - } -diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 6b6512521f4..0558467a805 100644 ---- a/dlls/winex11.drv/mouse.c -+++ b/dlls/winex11.drv/mouse.c -@@ -422,7 +422,18 @@ void x11drv_xinput_enable( Display *display, Window window, long event_mask ) - memset( mask_bits, 0, sizeof(mask_bits) ); - XISetMask( mask_bits, XI_DeviceChanged ); - XISetMask( mask_bits, XI_RawMotion ); -- XISetMask( mask_bits, XI_ButtonPress ); -+ -+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) -+ { -+ XISetMask( mask_bits, XI_RawButtonPress ); -+ XISetMask( mask_bits, XI_RawButtonRelease ); -+ data->xi2_rawinput_only = TRUE; -+ } -+ else -+ { -+ XISetMask( mask_bits, XI_ButtonPress ); -+ data->xi2_rawinput_only = FALSE; -+ } - - pXISelectEvents( display, DefaultRootWindow( display ), &mask, 1 ); - -@@ -748,7 +759,6 @@ static void map_event_coords( HWND hwnd, Window window, Window event_root, int x - static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPUT *input ) - { - struct x11drv_win_data *data; -- RAWINPUT rawinput; - - input->type = INPUT_MOUSE; - -@@ -765,7 +775,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU - sync_window_cursor( window ); - last_cursor_change = input->u.mi.time; - } -- __wine_send_input( hwnd, input, &rawinput ); -+ __wine_send_input( hwnd, input, NULL ); - return; - } - -@@ -805,7 +815,7 @@ static void send_mouse_input( HWND hwnd, Window window, unsigned int state, INPU - SERVER_END_REQ; - } - -- __wine_send_input( hwnd, input, &rawinput ); -+ __wine_send_input( hwnd, input, NULL ); - } - - #ifdef SONAME_LIBXCURSOR -@@ -1760,7 +1770,6 @@ void move_resize_window( HWND hwnd, int dir ) - { - MSG msg; - INPUT input; -- RAWINPUT rawinput; - int x, y, rootX, rootY; - - if (!XQueryPointer( display, root_window, &root, &child, &rootX, &rootY, &x, &y, &xstate )) break; -@@ -1776,7 +1785,7 @@ void move_resize_window( HWND hwnd, int dir ) - input.u.mi.dwFlags = button_up_flags[button - 1] | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; - input.u.mi.time = GetTickCount(); - input.u.mi.dwExtraInfo = 0; -- __wine_send_input( hwnd, &input, &rawinput ); -+ __wine_send_input( hwnd, &input, NULL ); - } - - while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE )) -@@ -1952,6 +1961,7 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - x_rel = &thread_data->x_rel_valuator; - y_rel = &thread_data->y_rel_valuator; - -+ input.type = INPUT_MOUSE; - input.u.mi.mouseData = 0; - input.u.mi.dwFlags = MOUSEEVENTF_MOVE; - input.u.mi.time = EVENT_x11_time_to_win32_time( event->time ); -@@ -1987,10 +1997,85 @@ static BOOL X11DRV_RawMotion( XGenericEventCookie *xev ) - return FALSE; - } - -- TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); -+ if (!thread_data->xi2_rawinput_only) -+ { -+ TRACE( "pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); -+ __wine_send_input( 0, &input, NULL ); -+ } -+ else -+ { -+ TRACE( "raw pos %d,%d (event %f,%f)\n", input.u.mi.dx, input.u.mi.dy, dx, dy ); - -- input.type = INPUT_MOUSE; -- __wine_send_input( 0, &input, &rawinput ); -+ rawinput.header.dwType = RIM_TYPEMOUSE; -+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); -+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ -+ rawinput.header.wParam = RIM_INPUT; -+ rawinput.data.mouse.ulRawButtons = input.u.mi.dwFlags; -+ rawinput.data.mouse.u.ulButtons = input.u.mi.mouseData; -+ rawinput.data.mouse.lLastX = input.u.mi.dx; -+ rawinput.data.mouse.lLastY = input.u.mi.dy; -+ rawinput.data.mouse.ulExtraInformation = 0; -+ -+ input.type = INPUT_HARDWARE; -+ input.u.hi.uMsg = WM_INPUT; -+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16); -+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0); -+ if (rawinput.data.mouse.lLastX || rawinput.data.mouse.lLastY) -+ __wine_send_input( 0, &input, &rawinput ); -+ } -+ return TRUE; -+} -+ -+/*********************************************************************** -+ * X11DRV_RawButtonEvent -+ */ -+static BOOL X11DRV_RawButtonEvent( XGenericEventCookie *cookie ) -+{ -+ struct x11drv_thread_data *thread_data = x11drv_thread_data(); -+ XIRawEvent *event = cookie->data; -+ int button = event->detail - 1; -+ RAWINPUT rawinput; -+ INPUT input; -+ -+ if (!device_mapping || device_mapping->deviceid != event->sourceid) -+ update_device_mapping( event->display, event->sourceid ); -+ -+ if (button >= 0 && device_mapping) -+ button = device_mapping->buttons[button] - 1; -+ -+ if (button >= 0 && pointer_mapping) -+ button = pointer_mapping->buttons[button] - 1; -+ -+ if (button < 0 || button >= NB_BUTTONS) return FALSE; -+ if (thread_data->xi2_state != xi_enabled) return FALSE; -+ if (event->deviceid != thread_data->xi2_core_pointer) return FALSE; -+ -+ TRACE( "raw button %u (raw: %u) %s\n", button, event->detail, event->evtype == XI_RawButtonRelease ? "up" : "down" ); -+ -+ rawinput.header.dwType = RIM_TYPEMOUSE; -+ rawinput.header.dwSize = offsetof(RAWINPUT, data) + sizeof(RAWMOUSE); -+ rawinput.header.hDevice = ULongToHandle(1); /* WINE_MOUSE_HANDLE */ -+ rawinput.header.wParam = RIM_INPUT; -+ if (event->evtype == XI_RawButtonRelease) -+ { -+ rawinput.data.mouse.ulRawButtons = button_up_flags[button]; -+ rawinput.data.mouse.u.ulButtons = button_up_data[button]; -+ } -+ else -+ { -+ rawinput.data.mouse.ulRawButtons = button_down_flags[button]; -+ rawinput.data.mouse.u.ulButtons = button_down_data[button]; -+ } -+ rawinput.data.mouse.lLastX = 0; -+ rawinput.data.mouse.lLastY = 0; -+ rawinput.data.mouse.ulExtraInformation = 0; -+ -+ input.type = INPUT_HARDWARE; -+ input.u.hi.uMsg = WM_INPUT; -+ input.u.hi.wParamH = (WORD)(rawinput.header.dwSize >> 16); -+ input.u.hi.wParamL = (WORD)(rawinput.header.dwSize >> 0); -+ if (rawinput.data.mouse.ulRawButtons || rawinput.data.mouse.u.ulButtons) -+ __wine_send_input( 0, &input, &rawinput ); - return TRUE; - } - -@@ -2066,6 +2151,10 @@ BOOL X11DRV_GenericEvent( HWND hwnd, XEvent *xev ) - case XI_RawMotion: - ret = X11DRV_RawMotion( event ); - break; -+ case XI_RawButtonPress: -+ case XI_RawButtonRelease: -+ ret = X11DRV_RawButtonEvent( event ); -+ break; - - default: - TRACE( "Unhandled event %#x\n", event->evtype ); -diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index afa990b7e68..910a6c6cc18 100644 ---- a/dlls/winex11.drv/x11drv.h -+++ b/dlls/winex11.drv/x11drv.h -@@ -353,6 +353,7 @@ struct x11drv_thread_data - struct x11drv_valuator_data x_rel_valuator; - struct x11drv_valuator_data y_rel_valuator; - int xi2_core_pointer; /* XInput2 core pointer id */ -+ int xi2_rawinput_only; - }; - - extern struct x11drv_thread_data *x11drv_init_thread_data(void) DECLSPEC_HIDDEN; -diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c -index d8576949aea..c16825751c8 100644 ---- a/dlls/winex11.drv/x11drv_main.c -+++ b/dlls/winex11.drv/x11drv_main.c -@@ -633,6 +633,8 @@ void CDECL X11DRV_ThreadDetach(void) - - if (data) - { -+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) -+ x11drv_xinput_disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); - if (data->xim) XCloseIM( data->xim ); - if (data->font_set) XFreeFontSet( data->display, data->font_set ); - XCloseDisplay( data->display ); -@@ -704,6 +706,8 @@ struct x11drv_thread_data *x11drv_init_thread_data(void) - if (use_xim) X11DRV_SetupXIM(); - - x11drv_xinput_init(); -+ if (GetWindowThreadProcessId( GetDesktopWindow(), NULL ) == GetCurrentThreadId()) -+ x11drv_xinput_enable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); - - return data; - } --- -2.30.2 - diff --git a/wine.spec b/wine.spec index 9135cb8..836a6bf 100644 --- a/wine.spec +++ b/wine.spec @@ -140,7 +140,6 @@ Source8: wine-rpmlintrc # SUSE specific patches # - currently none, but add them here #Patch0: susefixes.patch -Source99: a886228fbcefe7b8de06d2dd7182272df6cc3c36.patch Recommends: wine-gecko >= 2.47.2 Conflicts: wine-gecko < 2.47.2 Recommends: wine-mono >= 6.1.1 @@ -224,7 +223,6 @@ cp %{S:3} . %if %{staging} # apply wine staging patch set on top of the wine release. tar xf %{SOURCE100} -cp %{SOURCE99} ./wine-staging-%staging_version/patches/user32-rawinput-mouse/0008-winex11.drv-Listen-to-RawMotion-and-RawButton-events.patch bash ./wine-staging-%staging_version/patches/patchinstall.sh --all %endif From 66db41f33d84f8defbe7868a0a22daccefb4237cddd35757a4c0a52ec66f2853 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 25 Apr 2021 08:36:07 +0000 Subject: [PATCH 8/8] OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=825 --- wine-winegcc-missing-includes.patch | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 wine-winegcc-missing-includes.patch diff --git a/wine-winegcc-missing-includes.patch b/wine-winegcc-missing-includes.patch deleted file mode 100644 index 7ebcff2..0000000 --- a/wine-winegcc-missing-includes.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/tools/winegcc/winegcc.c -+++ b/tools/winegcc/winegcc.c -@@ -904,6 +904,7 @@ no_compat_defines: - const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" }; - const char *root = opts->isysroot ? opts->isysroot : opts->sysroot ? opts->sysroot : ""; - const char *isystem = gcc_defs ? "-isystem" : "-I"; -+ const char *idirafter = gcc_defs ? "-idirafter" : "-I"; - - if (opts->use_msvcrt) - { -@@ -921,11 +922,11 @@ no_compat_defines: - if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue; - strarray_add(comp_args, strmake( "%s%s%s/wine/windows", isystem, root, incl_dirs[j] )); - } -- if (includedir) strarray_add( comp_args, strmake( "%s%s", isystem, includedir )); -+ if (includedir) strarray_add( comp_args, strmake( "%s%s", idirafter, includedir )); - for (j = 0; j < ARRAY_SIZE(incl_dirs); j++) - { - if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue; -- strarray_add(comp_args, strmake( "%s%s%s", isystem, root, incl_dirs[j] )); -+ strarray_add(comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] )); - } - } - else if (opts->wine_objdir)