diff --git a/patches/ntdll-CriticalSection/0003-ntdll-Use-fast-CS-functions-for-heap-locking.patch b/patches/ntdll-CriticalSection/0003-ntdll-Use-fast-CS-functions-for-heap-locking.patch index 6ede58a3..c7a2813f 100644 --- a/patches/ntdll-CriticalSection/0003-ntdll-Use-fast-CS-functions-for-heap-locking.patch +++ b/patches/ntdll-CriticalSection/0003-ntdll-Use-fast-CS-functions-for-heap-locking.patch @@ -1,219 +1,74 @@ -From 50e78099e8c5fbd74131e339b8e48488e1581c74 Mon Sep 17 00:00:00 2001 +From cad538b5197b0488f50d10eb58fa1b220e7d05dc Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 5 Aug 2017 03:39:23 +0200 Subject: [PATCH] ntdll: Use fast CS functions for heap locking. --- - dlls/ntdll/heap.c | 50 +++++++++++++++++++++++------------------------ - 1 file changed, 25 insertions(+), 25 deletions(-) + dlls/ntdll/heap.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c -index af2a489b727..178f81006d0 100644 +index d7ac44a4247..3fd02770b7b 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c -@@ -1338,7 +1338,7 @@ static BOOL HEAP_IsRealArena( HEAP *heapPtr, /* [in] ptr to the heap */ - flags |= heapPtr->flags; - /* calling HeapLock may result in infinite recursion, so do the critsect directly */ - if (!(flags & HEAP_NO_SERIALIZE)) -- RtlEnterCriticalSection( &heapPtr->critSection ); -+ enter_critical_section( &heapPtr->critSection ); - - if (block) /* only check this single memory block */ - { -@@ -1384,7 +1384,7 @@ static BOOL HEAP_IsRealArena( HEAP *heapPtr, /* [in] ptr to the heap */ - ret = TRUE; - - done: -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - return ret; +@@ -340,13 +340,13 @@ static inline ULONG heap_get_flags( const HEAP *heap, ULONG flags ) + static void heap_lock( HEAP *heap, ULONG flags ) + { + if (heap_get_flags( heap, flags ) & HEAP_NO_SERIALIZE) return; +- RtlEnterCriticalSection( &heap->cs ); ++ enter_critical_section( &heap->cs ); } -@@ -1558,9 +1558,9 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c + static void heap_unlock( HEAP *heap, ULONG flags ) + { + if (heap_get_flags( heap, flags ) & HEAP_NO_SERIALIZE) return; +- RtlLeaveCriticalSection( &heap->cs ); ++ leave_critical_section( &heap->cs ); + } + + /*********************************************************************** +@@ -1583,9 +1583,9 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c if (processHeap) { HEAP *heapPtr = subheap->heap; -- RtlEnterCriticalSection( &processHeap->critSection ); -+ enter_critical_section( &processHeap->critSection ); +- RtlEnterCriticalSection( &processHeap->cs ); ++ enter_critical_section( &processHeap->cs ); list_add_head( &processHeap->entry, &heapPtr->entry ); -- RtlLeaveCriticalSection( &processHeap->critSection ); -+ leave_critical_section( &processHeap->critSection ); +- RtlLeaveCriticalSection( &processHeap->cs ); ++ leave_critical_section( &processHeap->cs ); } else if (!addr) { -@@ -1598,9 +1598,9 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap ) +@@ -1629,9 +1629,9 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap ) if (heap == processHeap) return heap; /* cannot delete the main process heap */ /* remove it from the per-process list */ -- RtlEnterCriticalSection( &processHeap->critSection ); -+ enter_critical_section( &processHeap->critSection ); +- RtlEnterCriticalSection( &processHeap->cs ); ++ enter_critical_section( &processHeap->cs ); list_remove( &heapPtr->entry ); -- RtlLeaveCriticalSection( &processHeap->critSection ); -+ leave_critical_section( &processHeap->critSection ); +- RtlLeaveCriticalSection( &processHeap->cs ); ++ leave_critical_section( &processHeap->cs ); - heapPtr->critSection.DebugInfo->Spare[0] = 0; - RtlDeleteCriticalSection( &heapPtr->critSection ); -@@ -1673,12 +1673,12 @@ void * WINAPI DECLSPEC_HOTPATCH RtlAllocateHeap( HANDLE heap, ULONG flags, SIZE_ - } - if (rounded_size < HEAP_MIN_DATA_SIZE) rounded_size = HEAP_MIN_DATA_SIZE; - -- if (!(flags & HEAP_NO_SERIALIZE)) RtlEnterCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) enter_critical_section( &heapPtr->critSection ); - - if (rounded_size >= HEAP_MIN_LARGE_BLOCK_SIZE && (flags & HEAP_GROWABLE)) - { - void *ret = allocate_large_block( heap, flags, size ); -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - if (!ret && (flags & HEAP_GENERATE_EXCEPTIONS)) RtlRaiseStatus( STATUS_NO_MEMORY ); - TRACE("(%p,%08x,%08lx): returning %p\n", heap, flags, size, ret ); - return ret; -@@ -1690,7 +1690,7 @@ void * WINAPI DECLSPEC_HOTPATCH RtlAllocateHeap( HANDLE heap, ULONG flags, SIZE_ - { - TRACE("(%p,%08x,%08lx): returning NULL\n", - heap, flags, size ); -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - if (flags & HEAP_GENERATE_EXCEPTIONS) RtlRaiseStatus( STATUS_NO_MEMORY ); - return NULL; - } -@@ -1716,7 +1716,7 @@ void * WINAPI DECLSPEC_HOTPATCH RtlAllocateHeap( HANDLE heap, ULONG flags, SIZE_ - notify_alloc( pInUse + 1, size, flags & HEAP_ZERO_MEMORY ); - initialize_block( pInUse + 1, size, pInUse->unused_bytes, flags ); - -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - - TRACE("(%p,%08x,%08lx): returning %p\n", heap, flags, size, pInUse + 1 ); - return pInUse + 1; -@@ -1756,7 +1756,7 @@ BOOLEAN WINAPI DECLSPEC_HOTPATCH RtlFreeHeap( HANDLE heap, ULONG flags, void *pt - - flags &= HEAP_NO_SERIALIZE; - flags |= heapPtr->flags; -- if (!(flags & HEAP_NO_SERIALIZE)) RtlEnterCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) enter_critical_section( &heapPtr->critSection ); - - /* Inform valgrind we are trying to free memory, so it can throw up an error message */ - notify_free( ptr ); -@@ -1770,12 +1770,12 @@ BOOLEAN WINAPI DECLSPEC_HOTPATCH RtlFreeHeap( HANDLE heap, ULONG flags, void *pt - else - HEAP_MakeInUseBlockFree( subheap, pInUse ); - -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - TRACE("(%p,%08x,%p): returning TRUE\n", heap, flags, ptr ); - return TRUE; - - error: -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_INVALID_PARAMETER ); - TRACE("(%p,%08x,%p): returning FALSE\n", heap, flags, ptr ); - return FALSE; -@@ -1817,7 +1817,7 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size - flags &= HEAP_GENERATE_EXCEPTIONS | HEAP_NO_SERIALIZE | HEAP_ZERO_MEMORY | - HEAP_REALLOC_IN_PLACE_ONLY; - flags |= heapPtr->flags; -- if (!(flags & HEAP_NO_SERIALIZE)) RtlEnterCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) enter_critical_section( &heapPtr->critSection ); - - rounded_size = ROUND_SIZE(size) + HEAP_TAIL_EXTRA_SIZE(flags); - if (rounded_size < size) goto oom; /* overflow */ -@@ -1911,19 +1911,19 @@ PVOID WINAPI RtlReAllocateHeap( HANDLE heap, ULONG flags, PVOID ptr, SIZE_T size - - ret = pArena + 1; - done: -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - TRACE("(%p,%08x,%p,%08lx): returning %p\n", heap, flags, ptr, size, ret ); - return ret; - - oom: -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - if (flags & HEAP_GENERATE_EXCEPTIONS) RtlRaiseStatus( STATUS_NO_MEMORY ); - RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_NO_MEMORY ); - TRACE("(%p,%08x,%p,%08lx): returning NULL\n", heap, flags, ptr, size ); - return NULL; - - error: -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_INVALID_PARAMETER ); - TRACE("(%p,%08x,%p,%08lx): returning NULL\n", heap, flags, ptr, size ); - return NULL; -@@ -1969,7 +1969,7 @@ BOOLEAN WINAPI RtlLockHeap( HANDLE heap ) - { - HEAP *heapPtr = HEAP_GetPtr( heap ); - if (!heapPtr) return FALSE; -- RtlEnterCriticalSection( &heapPtr->critSection ); -+ enter_critical_section( &heapPtr->critSection ); - return TRUE; - } - -@@ -1990,7 +1990,7 @@ BOOLEAN WINAPI RtlUnlockHeap( HANDLE heap ) - { - HEAP *heapPtr = HEAP_GetPtr( heap ); - if (!heapPtr) return FALSE; -- RtlLeaveCriticalSection( &heapPtr->critSection ); -+ leave_critical_section( &heapPtr->critSection ); - return TRUE; - } - -@@ -2026,7 +2026,7 @@ SIZE_T WINAPI RtlSizeHeap( HANDLE heap, ULONG flags, const void *ptr ) - } - flags &= HEAP_NO_SERIALIZE; - flags |= heapPtr->flags; -- if (!(flags & HEAP_NO_SERIALIZE)) RtlEnterCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) enter_critical_section( &heapPtr->critSection ); - - pArena = (const ARENA_INUSE *)ptr - 1; - if (!validate_block_pointer( heapPtr, &subheap, pArena )) -@@ -2043,7 +2043,7 @@ SIZE_T WINAPI RtlSizeHeap( HANDLE heap, ULONG flags, const void *ptr ) - { - ret = (pArena->size & ARENA_SIZE_MASK) - pArena->unused_bytes; - } -- if (!(flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - - TRACE("(%p,%08x,%p): returning %08lx\n", heap, flags, ptr, ret ); - return ret; -@@ -2090,7 +2090,7 @@ NTSTATUS WINAPI RtlWalkHeap( HANDLE heap, PVOID entry_ptr ) - - if (!heapPtr || !entry) return STATUS_INVALID_PARAMETER; - -- if (!(heapPtr->flags & HEAP_NO_SERIALIZE)) RtlEnterCriticalSection( &heapPtr->critSection ); -+ if (!(heapPtr->flags & HEAP_NO_SERIALIZE)) enter_critical_section( &heapPtr->critSection ); - - /* FIXME: enumerate large blocks too */ - -@@ -2195,7 +2195,7 @@ NTSTATUS WINAPI RtlWalkHeap( HANDLE heap, PVOID entry_ptr ) - if (TRACE_ON(heap)) HEAP_DumpEntry(entry); - - HW_end: -- if (!(heapPtr->flags & HEAP_NO_SERIALIZE)) RtlLeaveCriticalSection( &heapPtr->critSection ); -+ if (!(heapPtr->flags & HEAP_NO_SERIALIZE)) leave_critical_section( &heapPtr->critSection ); - return ret; - } - -@@ -2218,7 +2218,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps ) + heapPtr->cs.DebugInfo->Spare[0] = 0; + RtlDeleteCriticalSection( &heapPtr->cs ); +@@ -2242,7 +2242,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps ) ULONG total = 1; /* main heap */ struct list *ptr; -- RtlEnterCriticalSection( &processHeap->critSection ); -+ enter_critical_section( &processHeap->critSection ); +- RtlEnterCriticalSection( &processHeap->cs ); ++ enter_critical_section( &processHeap->cs ); LIST_FOR_EACH( ptr, &processHeap->entry ) total++; if (total <= count) { -@@ -2226,7 +2226,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps ) +@@ -2250,7 +2250,7 @@ ULONG WINAPI RtlGetProcessHeaps( ULONG count, HANDLE *heaps ) LIST_FOR_EACH( ptr, &processHeap->entry ) *heaps++ = LIST_ENTRY( ptr, HEAP, entry ); } -- RtlLeaveCriticalSection( &processHeap->critSection ); -+ leave_critical_section( &processHeap->critSection ); +- RtlLeaveCriticalSection( &processHeap->cs ); ++ leave_critical_section( &processHeap->cs ); return total; } -- -2.17.1 +2.35.1 diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b3cf1c18..6c4d9482 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "1c4131ba788579f511318270410734d73575caa6" + echo "7de36f8e98b2cbbdcc360bdba96a5fe83e815d1a" } # Show version information diff --git a/patches/user32-rawinput-mouse/0002-winex11.drv-Support-XInput2-events-for-individual-wi.patch b/patches/user32-rawinput-mouse/0002-winex11.drv-Support-XInput2-events-for-individual-wi.patch index e43bcf5f..c62610c3 100644 --- a/patches/user32-rawinput-mouse/0002-winex11.drv-Support-XInput2-events-for-individual-wi.patch +++ b/patches/user32-rawinput-mouse/0002-winex11.drv-Support-XInput2-events-for-individual-wi.patch @@ -1,4 +1,4 @@ -From 34322692c54f01a228cdab8419283e5e15fd55b1 Mon Sep 17 00:00:00 2001 +From 4fb0e8d596496359484426d726a929ff8acf2e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 23 Jan 2020 11:00:19 +0100 Subject: [PATCH] winex11.drv: Support XInput2 events for individual windows. @@ -14,10 +14,10 @@ which can bring additional information. 5 files changed, 65 insertions(+), 17 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c -index 61fe5578e8b..c601d935df1 100644 +index c335bc5ba2b..3523e9c843c 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c -@@ -358,6 +358,7 @@ NTSTATUS x11drv_create_desktop( void *arg ) +@@ -359,6 +359,7 @@ NTSTATUS x11drv_create_desktop( void *arg ) 0, 0, params->width, params->height, 0, default_visual.depth, InputOutput, default_visual.visual, CWEventMask | CWCursor | CWColormap, &win_attr ); if (!win) return FALSE; @@ -26,7 +26,7 @@ index 61fe5578e8b..c601d935df1 100644 X11DRV_init_desktop( win, params->width, params->height ); diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c -index c0232eef256..8f98676d9cf 100644 +index a321e324a24..dec32ec963a 100644 --- a/dlls/winex11.drv/event.c +++ b/dlls/winex11.drv/event.c @@ -239,6 +239,13 @@ static Bool filter_event( Display *display, XEvent *event, char *arg ) @@ -44,7 +44,7 @@ index c0232eef256..8f98676d9cf 100644 case MotionNotify: case EnterNotify: diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c -index 826b8d20f69..2c8919e8c3d 100644 +index eee737a1e40..bf67d6b727f 100644 --- a/dlls/winex11.drv/mouse.c +++ b/dlls/winex11.drv/mouse.c @@ -304,20 +304,32 @@ void x11drv_xinput_init(void) @@ -172,7 +172,7 @@ index 826b8d20f69..2c8919e8c3d 100644 { - disable_xinput2(); + x11drv_xinput_disable( data->display, DefaultRootWindow( data->display ), PointerMotionMask ); - DestroyWindow( msg_hwnd ); + NtUserDestroyWindow( msg_hwnd ); return FALSE; } @@ -530,7 +557,7 @@ LRESULT clip_cursor_notify( HWND hwnd, HWND prev_clip_hwnd, HWND new_clip_hwnd ) @@ -185,10 +185,10 @@ index 826b8d20f69..2c8919e8c3d 100644 } else if (prev_clip_hwnd) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c -index 338796e99e1..6f4c2cabd7d 100644 +index b9450911abc..4c7faeac969 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c -@@ -353,6 +353,7 @@ static void sync_window_style( struct x11drv_win_data *data ) +@@ -358,6 +358,7 @@ static void sync_window_style( struct x11drv_win_data *data ) int mask = get_window_attributes( data, &attr ); XChangeWindowAttributes( data->display, data->whole_window, mask, &attr ); @@ -196,7 +196,7 @@ index 338796e99e1..6f4c2cabd7d 100644 } } -@@ -1588,6 +1589,7 @@ static void create_whole_window( struct x11drv_win_data *data ) +@@ -1593,6 +1594,7 @@ static void create_whole_window( struct x11drv_win_data *data ) data->vis.visual, mask, &attr ); if (!data->whole_window) goto done; @@ -204,16 +204,16 @@ index 338796e99e1..6f4c2cabd7d 100644 set_initial_wm_hints( data->display, data->whole_window ); set_wm_hints( data ); -@@ -1902,6 +1904,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd ) +@@ -1907,6 +1909,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd ) data->clip_window = XCreateWindow( data->display, root_window, 0, 0, 1, 1, 0, 0, InputOnly, default_visual.visual, CWOverrideRedirect | CWEventMask, &attr ); + x11drv_xinput_enable( data->display, data->clip_window, attr.event_mask ); XFlush( data->display ); NtUserSetProp( hwnd, clip_window_prop, (HANDLE)data->clip_window ); - X11DRV_InitClipboard(); + x11drv_client_call( client_clipboard_init, 0 ); diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index 5fb2e672938..502b302993a 100644 +index d92a235f889..82540cab507 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -253,6 +253,8 @@ extern void X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN; @@ -225,7 +225,7 @@ index 5fb2e672938..502b302993a 100644 extern DWORD copy_image_bits( BITMAPINFO *info, BOOL is_r8g8b8, XImage *image, const struct gdi_image_bits *src_bits, struct gdi_image_bits *dst_bits, -@@ -374,6 +376,14 @@ struct x11drv_escape_flush_gl_drawable +@@ -359,6 +361,14 @@ struct x11drv_escape_flush_gl_drawable * X11 USER driver */ @@ -240,7 +240,7 @@ index 5fb2e672938..502b302993a 100644 struct x11drv_thread_data { Display *display; -@@ -390,7 +400,7 @@ struct x11drv_thread_data +@@ -375,7 +385,7 @@ struct x11drv_thread_data HWND clip_hwnd; /* message window stored in desktop while clipping is active */ DWORD clip_reset; /* time when clipping was last reset */ #ifdef HAVE_X11_EXTENSIONS_XINPUT2_H diff --git a/patches/wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch b/patches/wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch index f63ec723..eec0f0d0 100644 --- a/patches/wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch +++ b/patches/wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch @@ -1,4 +1,4 @@ -From 674b3d1e35526de8ab073854aae5d457954d40e6 Mon Sep 17 00:00:00 2001 +From 76fdede0c6b36240135ce2e6f4419cef13fbe36f Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 31 May 2018 11:52:09 +1000 Subject: [PATCH] winex11: Handle negative orAltitude values @@ -8,10 +8,10 @@ Subject: [PATCH] winex11: Handle negative orAltitude values 1 file changed, 16 insertions(+) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c -index ef42a1f07c..7b1bf38146 100644 +index a6b80daedbe..537e96f7808 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c -@@ -903,6 +903,11 @@ static BOOL motion_event( HWND hwnd, XEvent *event ) +@@ -902,6 +902,11 @@ static BOOL motion_event( HWND hwnd, XEvent *event ) (abs(motion->axis_data[3]), abs(motion->axis_data[4]))) * (gMsgPacket.pkStatus & TPS_INVERT?-1:1)); @@ -23,7 +23,7 @@ index ef42a1f07c..7b1bf38146 100644 gMsgPacket.pkNormalPressure = motion->axis_data[2]; gMsgPacket.pkButtons = get_button_state(curnum); gMsgPacket.pkChanged = get_changed_state(&gMsgPacket); -@@ -929,6 +934,7 @@ static BOOL button_event( HWND hwnd, XEvent *event ) +@@ -928,6 +933,7 @@ static BOOL button_event( HWND hwnd, XEvent *event ) gMsgPacket.pkTime = EVENT_x11_time_to_win32_time(button->time); gMsgPacket.pkSerialNumber = gSerial++; gMsgPacket.pkCursor = curnum; @@ -31,7 +31,7 @@ index ef42a1f07c..7b1bf38146 100644 if (button->axes_count > 0) { gMsgPacket.pkX = button->axis_data[0]; gMsgPacket.pkY = button->axis_data[1]; -@@ -943,6 +949,12 @@ static BOOL button_event( HWND hwnd, XEvent *event ) +@@ -942,6 +948,12 @@ static BOOL button_event( HWND hwnd, XEvent *event ) gMsgPacket.pkOrientation = last_packet.pkOrientation; gMsgPacket.pkNormalPressure = last_packet.pkNormalPressure; } @@ -43,8 +43,8 @@ index ef42a1f07c..7b1bf38146 100644 + gMsgPacket.pkButtons = get_button_state(curnum); gMsgPacket.pkChanged = get_changed_state(&gMsgPacket); - SendMessageW(hwndTabletDefault,WT_PACKET,gMsgPacket.pkSerialNumber,(LPARAM)hwnd); -@@ -985,6 +997,10 @@ static BOOL proximity_event( HWND hwnd, XEvent *event ) + send_message( hwndTabletDefault, WT_PACKET, gMsgPacket.pkSerialNumber, (LPARAM)hwnd ); +@@ -984,6 +996,10 @@ static BOOL proximity_event( HWND hwnd, XEvent *event ) gMsgPacket.pkOrientation.orAltitude = ((1000 - 15 * max(abs(proximity->axis_data[3]), abs(proximity->axis_data[4]))) * (gMsgPacket.pkStatus & TPS_INVERT?-1:1)); @@ -56,5 +56,5 @@ index ef42a1f07c..7b1bf38146 100644 gMsgPacket.pkButtons = get_button_state(curnum); -- -2.17.1 +2.35.1 diff --git a/staging/upstream-commit b/staging/upstream-commit index 64506544..eed3755f 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -1c4131ba788579f511318270410734d73575caa6 +7de36f8e98b2cbbdcc360bdba96a5fe83e815d1a