From b24bd25253fe093f722ab576d29fdc41d04cb1ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 2 Aug 2019 19:14:55 +0100 Subject: gentoo resync : 02.08.2019 --- ...ts-5.12.4-fix-notification-of-QDockWidget.patch | 37 ++++++++++++++++ ...enterleaveEvent-for-accepted-QTabletEvent.patch | 49 ++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch create mode 100644 dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch (limited to 'dev-qt/qtwidgets/files') diff --git a/dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch new file mode 100644 index 000000000000..5f72fef9d34c --- /dev/null +++ b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-fix-notification-of-QDockWidget.patch @@ -0,0 +1,37 @@ +Description: fix notification of QDockWidget when it gets undocked + Before the patch the notification was emitted only when the docker + was attached to the panel or changed a position on it. + . + It looks like the old behavior was documented in a unittest, + so this patch might actually be a "behavior change". + . + Note: https://mail.kde.org/pipermail/distributions/2019-April/000317.html +Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=06b8644953fc5267 +Last-Update: 2019-06-14 + +--- a/src/widgets/widgets/qdockwidget.cpp ++++ b/src/widgets/widgets/qdockwidget.cpp +@@ -1171,6 +1171,8 @@ void QDockWidgetPrivate::setWindowState( + QMainWindowLayout *mwlayout = qt_mainwindow_layout_from_dock(q); + if (mwlayout) + emit q->dockLocationChanged(mwlayout->dockWidgetArea(q)); ++ } else { ++ emit q->dockLocationChanged(Qt::NoDockWidgetArea); + } + } + +--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp ++++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp +@@ -669,7 +669,11 @@ void tst_QDockWidget::dockLocationChange + spy.clear(); + + dw.setFloating(true); +- QTest::qWait(100); ++ QTRY_COMPARE(spy.count(), 1); ++ QCOMPARE(qvariant_cast(spy.at(0).at(0)), ++ Qt::NoDockWidgetArea); ++ spy.clear(); ++ + dw.setFloating(false); + QTRY_COMPARE(spy.count(), 1); + QCOMPARE(qvariant_cast(spy.at(0).at(0)), diff --git a/dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch new file mode 100644 index 000000000000..ab225009ab43 --- /dev/null +++ b/dev-qt/qtwidgets/files/qtwidgets-5.12.4-synth-enterleaveEvent-for-accepted-QTabletEvent.patch @@ -0,0 +1,49 @@ +From de811eca72d17b7ef734afc1d44af00cc5952f22 Mon Sep 17 00:00:00 2001 +From: Dmitry Kazakov +Date: Mon, 11 Mar 2019 13:18:06 +0300 +Subject: [PATCH] Synthesize Enter/LeaveEvent for accepted QTabletEvent + +When the tablet event is accepted, then Qt doesn't synthesize a mouse +event, it means that QApplicationPrivate::sendMouseEvent() will not be +called, and, therefore, enter/leave events will not be dispatched. + +The patch looks a bit hackish. Ideally, the synthesize should happen +in QGuiApplicationPrivate::processTabletEvent(), which takes the decision +about synthesizing mouse events. But there is not enough information +on this level: neither qt_last_mouse_receiver nor the receiver widget +are known at this stage. + +On Windows and other platforms where there is a parallel stream of +mouse events synthesized by the platform, we shouldn't generate these +events manually. + +Change-Id: Ifbad6284483ee282ad129db54606f5d0d9ddd633 +--- + src/widgets/kernel/qwidgetwindow.cpp | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp +index fbc71cd0ea1..729a7f701ae 100644 +--- a/src/widgets/kernel/qwidgetwindow.cpp ++++ b/src/widgets/kernel/qwidgetwindow.cpp +@@ -1051,6 +1051,18 @@ void QWidgetWindow::handleTabletEvent(QTabletEvent *event) + event->setAccepted(ev.isAccepted()); + } + ++ /** ++ * Synthesize Enter/Leave events if it is requested by the system and user ++ */ ++ if (widget != qt_last_mouse_receiver && ++ event->isAccepted() && ++ !QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse && ++ qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTabletEvents)) { ++ ++ QApplicationPrivate::dispatchEnterLeave(widget, qt_last_mouse_receiver, event->globalPos()); ++ qt_last_mouse_receiver = widget; ++ } ++ + if (event->type() == QEvent::TabletRelease && event->buttons() == Qt::NoButton) + qt_tablet_target = 0; + } +-- +2.16.3 -- cgit v1.2.3