From 3590ea26ad0382b4450e86be6d423230fa2f2d28 Mon Sep 17 00:00:00 2001 From: Ivan Mahonin Date: May 01 2023 08:50:38 +0000 Subject: #assistants: enable stylus hovering for all OS --- diff --git a/toonz/sources/toonz/sceneviewerevents.cpp b/toonz/sources/toonz/sceneviewerevents.cpp index 12058e8..43f0d00 100644 --- a/toonz/sources/toonz/sceneviewerevents.cpp +++ b/toonz/sources/toonz/sceneviewerevents.cpp @@ -344,20 +344,11 @@ void SceneViewer::tabletEvent(QTabletEvent *e) { #endif } break; case QEvent::TabletMove: { -#ifdef MACOSX - // for now OSX seems to fail to call enter/leaveEvent properly while - // the tablet is floating bool isHoveringInsideViewer = !rect().marginsRemoved(QMargins(5, 5, 5, 5)).contains(e->pos()); // call the fake enter event if (isHoveringInsideViewer) onEnter(); -#else - // for Windowsm, use tabletEvent only for the left Button - if (m_tabletState != StartStroke && m_tabletState != OnStroke) { - m_tabletEvent = false; - break; - } -#endif + QPointF curPos = e->posF() * getDevPixRatio(); #if defined(_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) // Use the application attribute Qt::AA_CompressTabletEvents instead of the