Warning, /graphics/krita/3rdparty/ext_qt/0012-Synthesize-Enter-LeaveEvent-for-accepted-QTabletEven.patch is written in an unsupported language. File is not indexed.

0001 From 2b8b18bf1c8a9f64cb34f5d1f0822bc153ec42ee Mon Sep 17 00:00:00 2001
0002 From: Dmitry Kazakov <dimula73@gmail.com>
0003 Date: Mon, 11 Mar 2019 13:18:06 +0300
0004 Subject: [PATCH 1/4] Synthesize Enter/LeaveEvent for accepted QTabletEvent
0005 
0006 When the tablet event is accepted, then Qt doesn't synthesize a mouse
0007 event, it means that QApplicationPrivate::sendMouseEvent() will not be
0008 called, and, therefore, enter/leave events will not be dispatched.
0009 
0010 The patch looks a bit hackish. Ideally, the synthesize should happen
0011 in QGuiApplicationPrivate::processTabletEvent(), which takes the decision
0012 about synthesizing mouse events. But there is not enough information
0013 on this level: neither qt_last_mouse_receiver nor the receiver widget
0014 are known at this stage.
0015 
0016 Change-Id: Ifbad6284483ee282ad129db54606f5d0d9ddd633
0017 ---
0018  src/widgets/kernel/qwidgetwindow.cpp | 5 +++++
0019  1 file changed, 5 insertions(+)
0020 
0021 diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
0022 index c3f570ce4f..008d793a85 100644
0023 --- a/src/widgets/kernel/qwidgetwindow.cpp
0024 +++ b/src/widgets/kernel/qwidgetwindow.cpp
0025 @@ -1059,6 +1059,11 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event)
0026          event->setAccepted(ev.isAccepted());
0027      }
0028  
0029 +    if (event->isAccepted() && widget != qt_last_mouse_receiver) {
0030 +        QApplicationPrivate::dispatchEnterLeave(widget, qt_last_mouse_receiver, event->globalPos());
0031 +        qt_last_mouse_receiver = widget;
0032 +    }
0033 +
0034      if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton)
0035          qt_tablet_target = 0;
0036  }
0037 -- 
0038 2.20.1.windows.1
0039