diff options
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 12 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 0f10d5815f4..8797740a2b5 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1446,6 +1446,18 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT break; } } + else { + /* Send mouse event to signal end of tablet tracking to operators. */ + int32_t x, y; + if (getCursorPosition(x, y)) { + pushEvent(new GHOST_EventCursor([event timestamp] * 1000, + GHOST_kEventCursorMove, + window, + x, + y, + GHOST_TABLET_DATA_NONE)); + } + } break; default: diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 172fcbeb3de..5c2bfca3c0a 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -943,6 +943,13 @@ void GHOST_SystemX11::processEvent(XEvent *xe) if (!any_proximity) { // printf("proximity disable\n"); window->GetTabletData().Active = GHOST_kTabletModeNone; + + /* Send mouse event to signal end of tablet tracking to operators. */ + int32_t x, y; + if (getCursorPosition(x, y)) { + pushEvent(new GHOST_EventCursor( + getMilliSeconds(), GHOST_kEventCursorMove, window, x, y, GHOST_TABLET_DATA_NONE)); + } } } #endif /* WITH_X11_XINPUT */ @@ -1558,6 +1565,13 @@ void GHOST_SystemX11::processEvent(XEvent *xe) } else if (xe->type == xtablet.ProxOutEvent) { window->GetTabletData().Active = GHOST_kTabletModeNone; + + /* Send mouse event to signal end of tablet tracking to operators. */ + int32_t x, y; + if (getCursorPosition(x, y)) { + pushEvent(new GHOST_EventCursor( + getMilliSeconds(), GHOST_kEventCursorMove, window, x, y, GHOST_TABLET_DATA_NONE)); + } } } #endif // WITH_X11_XINPUT |