diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 3cc48b442d4..e50736d6b88 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -59,6 +59,7 @@ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets(); QWidget *qt_button_down = 0; // widget got last button-down static QWidget *qt_tablet_target = 0; +static QWidget *qt_tablet_target_window = 0; // popup control QWidget *qt_popup_down = 0; // popup that contains the pressed widget @@ -103,8 +104,10 @@ QWidgetWindow::QWidgetWindow(QWidget *widget) QWidgetWindow::~QWidgetWindow() { - if (m_widget == qt_tablet_target) + if (m_widget == qt_tablet_target_window) { qt_tablet_target = 0; + qt_tablet_target_window = 0; + } } #ifndef QT_NO_ACCESSIBILITY @@ -774,6 +777,7 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event) widget = m_widget; qt_tablet_target = widget; + qt_tablet_target_window = m_widget; } if (qt_tablet_target) { @@ -786,8 +790,10 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event) QGuiApplication::sendSpontaneousEvent(qt_tablet_target, &ev); } - if (event->type() == QEvent::TabletRelease) + if (event->type() == QEvent::TabletRelease) { qt_tablet_target = 0; + qt_tablet_target_window = 0; + } } #endif // QT_NO_TABLETEVENT |
