From 7e4e80886910891c660b987d53b608afaa540a88 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 22 Nov 2019 09:51:24 +1100 Subject: [PATCH] Rebase against 90fc020400c06c163d4ab117d8da755b0f0e0861 --- patches/patchinstall.sh | 2 +- ...11-Handle-negative-orAltitude-values.patch | 33 ++++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index cd8ce0c2..3f956e08 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "aa3d01e65019fb2f135f74cf26cfa1661ca09325" + echo "90fc020400c06c163d4ab117d8da755b0f0e0861" } # Show version information 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 49b78ee8..5f547c1d 100644 --- a/patches/wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch +++ b/patches/wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch @@ -1,17 +1,17 @@ -From 9914daf80dcad2ca1d8529c11a38b7825dcae570 Mon Sep 17 00:00:00 2001 +From 7e8265244d86db0ae31478484283472f4ddef3c6 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 --- - dlls/winex11.drv/wintab.c | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) + dlls/winex11.drv/wintab.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c -index f6b89e5..5cd6a39 100644 +index 12eb89ac7f4..87868576036 100644 --- a/dlls/winex11.drv/wintab.c +++ b/dlls/winex11.drv/wintab.c -@@ -914,6 +914,12 @@ static BOOL motion_event( HWND hwnd, XEvent *event ) +@@ -903,6 +903,12 @@ static BOOL motion_event( HWND hwnd, XEvent *event ) (abs(motion->axis_data[3]), abs(motion->axis_data[4]))) * (gMsgPacket.pkStatus & TPS_INVERT?-1:1)); @@ -24,20 +24,29 @@ index f6b89e5..5cd6a39 100644 gMsgPacket.pkNormalPressure = motion->axis_data[2]; gMsgPacket.pkButtons = get_button_state(curnum); gMsgPacket.pkChanged = get_changed_state(&gMsgPacket); -@@ -945,6 +951,12 @@ static BOOL button_event( HWND hwnd, XEvent *event ) - gMsgPacket.pkOrientation.orAltitude = ((1000 - 15 * max(abs(button->axis_data[3]), - abs(button->axis_data[4]))) - * (gMsgPacket.pkStatus & TPS_INVERT?-1:1)); +@@ -929,6 +935,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; ++ + if (button->axes_count > 0) { + gMsgPacket.pkX = button->axis_data[0]; + gMsgPacket.pkY = button->axis_data[1]; +@@ -943,6 +950,13 @@ static BOOL button_event( HWND hwnd, XEvent *event ) + gMsgPacket.pkOrientation = last_packet.pkOrientation; + gMsgPacket.pkNormalPressure = last_packet.pkNormalPressure; + } ++ + if (gMsgPacket.pkOrientation.orAltitude < 0) + { + FIXME("Negative orAltitude detected\n"); + return FALSE; + } + - gMsgPacket.pkNormalPressure = button->axis_data[2]; gMsgPacket.pkButtons = get_button_state(curnum); gMsgPacket.pkChanged = get_changed_state(&gMsgPacket); -@@ -987,6 +999,11 @@ static BOOL proximity_event( HWND hwnd, XEvent *event ) + SendMessageW(hwndTabletDefault,WT_PACKET,gMsgPacket.pkSerialNumber,(LPARAM)hwnd); +@@ -985,6 +999,11 @@ 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)); @@ -50,5 +59,5 @@ index f6b89e5..5cd6a39 100644 gMsgPacket.pkButtons = get_button_state(curnum); -- -1.9.1 +2.17.1