Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Rishel <rishel.nick@gmail.com>2021-02-23 20:50:03 +0300
committerNicholas Rishel <rishel.nick@gmail.com>2021-02-24 00:29:59 +0300
commitee4f306509679cf4aacb5367680f13044db60ea8 (patch)
treef6af621de71e7829dd04b082674f47adeb68b8bd /intern/ghost
parentf227a69a87307491e2375f5778d3da6f5653f47d (diff)
Fix T85844: high pressure at start of line.
m_tabletInRange is no longer set for Wintab after 2e81f2c01abd21fdbc reverted Wintab changes. This reverts most button processing to behavior present in 2.91.2. Left in place is a bugfix for Windows Ink: button events while a Windows Ink pen is in range should still be processed. Events processed by Windows Ink and not passed to DefWindowProc do not create WM_*BUTTON events, but button events from e.g. tablet pad express keys do create WM_*BUTTON events and should be handled.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index e7a72136bc6..45944d4d889 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -934,13 +934,15 @@ GHOST_EventButton *GHOST_SystemWin32::processButtonEvent(GHOST_TEventType type,
{
GHOST_SystemWin32 *system = (GHOST_SystemWin32 *)getSystem();
- GHOST_TabletData td = GHOST_TABLET_DATA_NONE;
-
- if (window->m_tabletInRange) {
- td = window->getTabletData();
+ if (type == GHOST_kEventButtonDown) {
+ window->updateMouseCapture(MousePressed);
+ }
+ else if (type == GHOST_kEventButtonUp) {
+ window->updateMouseCapture(MouseReleased);
}
- return new GHOST_EventButton(system->getMilliSeconds(), type, window, mask, td);
+ return new GHOST_EventButton(
+ system->getMilliSeconds(), type, window, mask, window->getTabletData());
}
void GHOST_SystemWin32::processPointerEvent(
@@ -1476,46 +1478,36 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
// Mouse events, processed
////////////////////////////////////////////////////////////////////////
case WM_LBUTTONDOWN:
- window->updateMouseCapture(MousePressed);
event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskLeft);
break;
case WM_MBUTTONDOWN:
- window->updateMouseCapture(MousePressed);
event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskMiddle);
break;
case WM_RBUTTONDOWN:
- window->updateMouseCapture(MousePressed);
event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskRight);
break;
case WM_XBUTTONDOWN:
if ((short)HIWORD(wParam) == XBUTTON1) {
- window->updateMouseCapture(MousePressed);
event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskButton4);
}
else if ((short)HIWORD(wParam) == XBUTTON2) {
- window->updateMouseCapture(MousePressed);
event = processButtonEvent(GHOST_kEventButtonDown, window, GHOST_kButtonMaskButton5);
}
break;
case WM_LBUTTONUP:
- window->updateMouseCapture(MouseReleased);
event = processButtonEvent(GHOST_kEventButtonUp, window, GHOST_kButtonMaskLeft);
break;
case WM_MBUTTONUP:
- window->updateMouseCapture(MouseReleased);
event = processButtonEvent(GHOST_kEventButtonUp, window, GHOST_kButtonMaskMiddle);
break;
case WM_RBUTTONUP:
- window->updateMouseCapture(MouseReleased);
event = processButtonEvent(GHOST_kEventButtonUp, window, GHOST_kButtonMaskRight);
break;
case WM_XBUTTONUP:
if ((short)HIWORD(wParam) == XBUTTON1) {
- window->updateMouseCapture(MouseReleased);
event = processButtonEvent(GHOST_kEventButtonUp, window, GHOST_kButtonMaskButton4);
}
else if ((short)HIWORD(wParam) == XBUTTON2) {
- window->updateMouseCapture(MouseReleased);
event = processButtonEvent(GHOST_kEventButtonUp, window, GHOST_kButtonMaskButton5);
}
break;