diff options
| author | Andrei V <andrei@ptaxa.net> | 2025-04-21 01:32:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-21 00:32:31 +0200 |
| commit | a3b96961a2d89b0a2e213f9dcf755e4cab98ac1d (patch) | |
| tree | 2b410d955e73fb47c9924b57b94c4a6a63cad725 /src/managers/input/Tablets.cpp | |
| parent | a3d32f3b70af7207363a42e846693e481188539a (diff) | |
tablet: naive window refocusing (#10110)
Signed-off-by: Andrei V <andrei@ptaxa.net>
Diffstat (limited to 'src/managers/input/Tablets.cpp')
| -rw-r--r-- | src/managers/input/Tablets.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/input/Tablets.cpp b/src/managers/input/Tablets.cpp index e1a2f2aa..a543e228 100644 --- a/src/managers/input/Tablets.cpp +++ b/src/managers/input/Tablets.cpp @@ -134,6 +134,7 @@ void CInputManager::onTabletAxis(CTablet::SAxisEvent e) { } } + simulateMouseMovement(); refocusTablet(PTAB, PTOOL, true); m_tmrLastCursorMovement.reset(); } @@ -173,6 +174,9 @@ void CInputManager::onTabletTip(CTablet::STipEvent e) { else g_pPointerManager->warpAbsolute(transformToActiveRegion(POS, PTAB->activeArea), PTAB); + if (e.in) + refocus(); + refocusTablet(PTAB, PTOOL, true); if (e.in) @@ -186,6 +190,9 @@ void CInputManager::onTabletTip(CTablet::STipEvent e) { void CInputManager::onTabletButton(CTablet::SButtonEvent e) { const auto PTOOL = ensureTabletToolPresent(e.tool); + if (e.down) + refocus(); + PROTO::tablet->buttonTool(PTOOL, e.button, e.down); if (e.down) |
