mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added wintab32-improvements patchset
This commit is contained in:
parent
26bb2b21f2
commit
7997379312
@ -404,6 +404,7 @@ patch_enable_all ()
|
||||
enable_wininet_InternetCrackUrlW="$1"
|
||||
enable_winmm_Delay_Import_Depends="$1"
|
||||
enable_winmm_mciSendCommandA="$1"
|
||||
enable_wintab32_improvements="$1"
|
||||
enable_wintrust_WTHelperGetProvCertFromChain="$1"
|
||||
enable_wintrust_WinVerifyTrust="$1"
|
||||
enable_wpcap_Dynamic_Linking="$1"
|
||||
@ -1389,6 +1390,9 @@ patch_enable ()
|
||||
winmm-mciSendCommandA)
|
||||
enable_winmm_mciSendCommandA="$2"
|
||||
;;
|
||||
wintab32-improvements)
|
||||
enable_wintab32_improvements="$2"
|
||||
;;
|
||||
wintrust-WTHelperGetProvCertFromChain)
|
||||
enable_wintrust_WTHelperGetProvCertFromChain="$2"
|
||||
;;
|
||||
@ -8175,6 +8179,27 @@ if test "$enable_winmm_mciSendCommandA" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wintab32-improvements
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#11846] Improve pressure sensitivity.
|
||||
# | * [#15443] Improve Wacom Bambo drawing support
|
||||
# | * [#18517] Improve eraser from working.
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winex11.drv/wintab.c, dlls/wintab32/context.c
|
||||
# |
|
||||
if test "$enable_wintab32_improvements" -eq 1; then
|
||||
patch_apply wintab32-improvements/0001-winex11-Implement-PK_CHANGE-for-wintab.patch
|
||||
patch_apply wintab32-improvements/0002-wintab32-Set-lcSysExtX-Y-for-the-first-index-of-WTI_.patch
|
||||
patch_apply wintab32-improvements/0003-winex11-Handle-negative-orAltitude-values.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Eriks Dobelis", "winex11: Implement PK_CHANGE for wintab.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "wintab32: Set lcSysExtX/Y for the first index of WTI_DDCTXS.", 1 },';
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "winex11: Handle negative orAltitude values.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wintrust-WinVerifyTrust
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,97 @@
|
||||
From 495ba38e883f801953cc995817048c9916a86177 Mon Sep 17 00:00:00 2001
|
||||
From: Eriks Dobelis <eriks00@moon.lv>
|
||||
Date: Thu, 31 May 2018 11:38:54 +1000
|
||||
Subject: [PATCH 1/3] winex11: Implement PK_CHANGE for wintab
|
||||
|
||||
---
|
||||
dlls/winex11.drv/wintab.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 53 insertions(+)
|
||||
|
||||
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
|
||||
index e4259bf..f6b89e5 100644
|
||||
--- a/dlls/winex11.drv/wintab.c
|
||||
+++ b/dlls/winex11.drv/wintab.c
|
||||
@@ -267,6 +267,13 @@ static int proximity_out_type;
|
||||
static HWND hwndTabletDefault;
|
||||
static WTPACKET gMsgPacket;
|
||||
static DWORD gSerial;
|
||||
+static DWORD lastX = 0xffff;
|
||||
+static DWORD lastY = 0xffff;
|
||||
+static UINT lastNormalPressure = 0xffff;
|
||||
+static DWORD lastButtons = 0xffff;
|
||||
+static UINT lastCursor = 0xffff;
|
||||
+static ORIENTATION lastOrientation = {.orAzimuth = 0xffff, .orAltitude = 0xffff, .orTwist = 0xffff };
|
||||
+static ROTATION lastRotation = {.roPitch = 0xffff, .roRoll = 0xffff, .roYaw = 0xffff };
|
||||
|
||||
/* Reference: http://www.wacomeng.com/devsupport/ibmpc/gddevpc.html
|
||||
*
|
||||
@@ -839,6 +846,50 @@ static int cursor_from_device(DWORD deviceid, LPWTI_CURSORS_INFO *cursorp)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+static DWORD get_changed_state( WTPACKET *pkt)
|
||||
+{
|
||||
+ DWORD change = 0;
|
||||
+ if (pkt->pkX != lastX)
|
||||
+ {
|
||||
+ change |= PK_X;
|
||||
+ lastX = pkt->pkX;
|
||||
+ }
|
||||
+ if (pkt->pkY != lastY)
|
||||
+ {
|
||||
+ change |= PK_Y;
|
||||
+ lastY = pkt->pkY;
|
||||
+ }
|
||||
+ if (pkt->pkNormalPressure != lastNormalPressure)
|
||||
+ {
|
||||
+ change |= PK_NORMAL_PRESSURE;
|
||||
+ lastNormalPressure = pkt->pkNormalPressure;
|
||||
+ }
|
||||
+ if (pkt->pkCursor != lastCursor)
|
||||
+ {
|
||||
+ change |= PK_CURSOR;
|
||||
+ lastCursor = pkt->pkCursor;
|
||||
+ }
|
||||
+ if (pkt->pkButtons != lastButtons)
|
||||
+ {
|
||||
+ change |= PK_BUTTONS;
|
||||
+ lastButtons = pkt->pkButtons;
|
||||
+ }
|
||||
+ if (pkt->pkOrientation.orAzimuth != lastOrientation.orAzimuth || pkt->pkOrientation.orAltitude != lastOrientation.orAltitude ||
|
||||
+ pkt->pkOrientation.orTwist != lastOrientation.orTwist)
|
||||
+ {
|
||||
+ change |= PK_ORIENTATION;
|
||||
+ lastOrientation = pkt->pkOrientation;
|
||||
+ }
|
||||
+ if (pkt->pkRotation.roPitch != lastRotation.roPitch || pkt->pkRotation.roRoll != lastRotation.roRoll ||
|
||||
+ pkt->pkRotation.roYaw != lastRotation.roYaw)
|
||||
+ {
|
||||
+ change |= PK_ROTATION;
|
||||
+ lastRotation = pkt->pkRotation;
|
||||
+ }
|
||||
+
|
||||
+ return change;
|
||||
+}
|
||||
+
|
||||
static BOOL motion_event( HWND hwnd, XEvent *event )
|
||||
{
|
||||
XDeviceMotionEvent *motion = (XDeviceMotionEvent *)event;
|
||||
@@ -865,6 +916,7 @@ static BOOL motion_event( HWND hwnd, XEvent *event )
|
||||
* (gMsgPacket.pkStatus & TPS_INVERT?-1:1));
|
||||
gMsgPacket.pkNormalPressure = motion->axis_data[2];
|
||||
gMsgPacket.pkButtons = get_button_state(curnum);
|
||||
+ gMsgPacket.pkChanged = get_changed_state(&gMsgPacket);
|
||||
SendMessageW(hwndTabletDefault,WT_PACKET,gMsgPacket.pkSerialNumber,(LPARAM)hwnd);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -895,6 +947,7 @@ static BOOL button_event( HWND hwnd, XEvent *event )
|
||||
* (gMsgPacket.pkStatus & TPS_INVERT?-1:1));
|
||||
gMsgPacket.pkNormalPressure = button->axis_data[2];
|
||||
gMsgPacket.pkButtons = get_button_state(curnum);
|
||||
+ gMsgPacket.pkChanged = get_changed_state(&gMsgPacket);
|
||||
SendMessageW(hwndTabletDefault,WT_PACKET,gMsgPacket.pkSerialNumber,(LPARAM)hwnd);
|
||||
return TRUE;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
@ -0,0 +1,26 @@
|
||||
From d0fae855025f12e29ce9be1aa0a8204e50fc39e5 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 31 May 2018 11:45:10 +1000
|
||||
Subject: [PATCH 2/3] wintab32: Set lcSysExtX/Y for the first index of
|
||||
WTI_DDCTXS
|
||||
|
||||
---
|
||||
dlls/wintab32/context.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wintab32/context.c b/dlls/wintab32/context.c
|
||||
index 8db6217..fe666a5 100644
|
||||
--- a/dlls/wintab32/context.c
|
||||
+++ b/dlls/wintab32/context.c
|
||||
@@ -410,7 +410,7 @@ static UINT WTInfoT(UINT wCategory, UINT nIndex, LPVOID lpOutput, BOOL bUnicode)
|
||||
pWTInfoW(wCategory, nIndex, &buf);
|
||||
|
||||
/* Handle system extents here, as we can use user32.dll code to set them */
|
||||
- if(wCategory == WTI_DEFSYSCTX)
|
||||
+ if(wCategory == WTI_DEFSYSCTX || wCategory == WTI_DDCTXS)
|
||||
{
|
||||
buf.lcSysExtX = GetSystemMetrics(SM_CXSCREEN);
|
||||
buf.lcSysExtY = GetSystemMetrics(SM_CYSCREEN);
|
||||
--
|
||||
1.9.1
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 0a77e5d626632db48fd718163f166df47641b182 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 31 May 2018 11:52:09 +1000
|
||||
Subject: [PATCH 3/3] winex11: Handle negative orAltitude values
|
||||
|
||||
---
|
||||
dlls/winex11.drv/wintab.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
|
||||
index f6b89e5..0089266 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 )
|
||||
(abs(motion->axis_data[3]),
|
||||
abs(motion->axis_data[4])))
|
||||
* (gMsgPacket.pkStatus & TPS_INVERT?-1:1));
|
||||
+
|
||||
+ if (gMsgPacket.pkOrientation.orAltitude < 0)
|
||||
+ {
|
||||
+ FIXME("Negative orAltitude detected\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
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));
|
||||
+ 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 )
|
||||
gMsgPacket.pkOrientation.orAltitude = ((1000 - 15 * max(abs(proximity->axis_data[3]),
|
||||
abs(proximity->axis_data[4])))
|
||||
* (gMsgPacket.pkStatus & TPS_INVERT?-1:1));
|
||||
+ if (gMsgPacket.pkOrientation.orAltitude < 0)
|
||||
+ {
|
||||
+ FIXME("Negative orAltitude detected\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
gMsgPacket.pkNormalPressure = proximity->axis_data[2];
|
||||
gMsgPacket.pkButtons = get_button_state(curnum);
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
5
patches/wintab32-improvements/definition
Normal file
5
patches/wintab32-improvements/definition
Normal file
@ -0,0 +1,5 @@
|
||||
Fixes: [11846] Improve pressure sensitivity.
|
||||
Fixes: [15443] Improve Wacom Bambo drawing support
|
||||
Fixes: [18517] Improve eraser from working.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user