summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-04 23:01:17 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2019-04-04 23:01:17 +0000
commited485243b594a730cebee4d76847e0f556d369f4 (patch)
tree545dd98a3138782df786f742cac02bc63113eaf6 /src/widgets/kernel
parent8d7c97d428cdf89c3419a4e13b62a9849feefce9 (diff)
parenteb606d85b3f1548445cfd1fee43f882da88fb6e7 (diff)
Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/mac.pri5
-rw-r--r--src/widgets/kernel/qgesturemanager.cpp5
-rw-r--r--src/widgets/kernel/qgesturerecognizer.cpp6
-rw-r--r--src/widgets/kernel/qwidget.cpp7
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp7
5 files changed, 20 insertions, 10 deletions
diff --git a/src/widgets/kernel/mac.pri b/src/widgets/kernel/mac.pri
index f7e7aa869a..d21e5d4a74 100644
--- a/src/widgets/kernel/mac.pri
+++ b/src/widgets/kernel/mac.pri
@@ -1,4 +1 @@
-macos {
- LIBS_PRIVATE += -framework AppKit -lz
- *-mwerks:INCLUDEPATH += compat
-}
+macos: LIBS_PRIVATE += -framework AppKit -lz
diff --git a/src/widgets/kernel/qgesturemanager.cpp b/src/widgets/kernel/qgesturemanager.cpp
index 57d6994c88..cd27c9c5be 100644
--- a/src/widgets/kernel/qgesturemanager.cpp
+++ b/src/widgets/kernel/qgesturemanager.cpp
@@ -143,11 +143,6 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
void QGestureManager::unregisterGestureRecognizer(Qt::GestureType type)
{
QList<QGestureRecognizer *> list = m_recognizers.values(type);
- while (QGestureRecognizer *recognizer = m_recognizers.take(type)) {
- // ensuring an entry exists causes the recognizer to be deleted on destruction of the manager
- auto &gestures = m_obsoleteGestures[recognizer];
- Q_UNUSED(gestures);
- }
foreach (QGesture *g, m_gestureToRecognizer.keys()) {
QGestureRecognizer *recognizer = m_gestureToRecognizer.value(g);
if (list.contains(recognizer)) {
diff --git a/src/widgets/kernel/qgesturerecognizer.cpp b/src/widgets/kernel/qgesturerecognizer.cpp
index 65c46a5e56..75d091ce4e 100644
--- a/src/widgets/kernel/qgesturerecognizer.cpp
+++ b/src/widgets/kernel/qgesturerecognizer.cpp
@@ -41,6 +41,7 @@
#include "private/qgesture_p.h"
#include "private/qgesturemanager_p.h"
+#include "private/qapplication_p.h"
#ifndef QT_NO_GESTURES
@@ -231,6 +232,11 @@ Qt::GestureType QGestureRecognizer::registerRecognizer(QGestureRecognizer *recog
*/
void QGestureRecognizer::unregisterRecognizer(Qt::GestureType type)
{
+ auto qAppPriv = QApplicationPrivate::instance();
+ if (!qAppPriv)
+ return;
+ if (!qAppPriv->gestureManager)
+ return;
QGestureManager::instance()->unregisterGestureRecognizer(type);
}
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 90a23f7cd4..74b18d9991 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1538,14 +1538,19 @@ void QWidgetPrivate::createTLSysExtra()
extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh));
if (extra->topextra->opacity != 255 && q->isWindow())
extra->topextra->window->setOpacity(qreal(extra->topextra->opacity) / qreal(255));
+
+ const bool isTipLabel = q->inherits("QTipLabel");
+ const bool isAlphaWidget = !isTipLabel && q->inherits("QAlphaWidget");
#ifdef Q_OS_WIN
// Pass on native parent handle for Widget embedded into Active X.
const QVariant activeXNativeParentHandle = q->property(activeXNativeParentHandleProperty);
if (activeXNativeParentHandle.isValid())
extra->topextra->window->setProperty(activeXNativeParentHandleProperty, activeXNativeParentHandle);
- if (q->inherits("QTipLabel") || q->inherits("QAlphaWidget"))
+ if (isTipLabel || isAlphaWidget)
extra->topextra->window->setProperty("_q_windowsDropShadow", QVariant(true));
#endif
+ if (isTipLabel || isAlphaWidget || q->inherits("QRollEffect"))
+ qt_window_private(extra->topextra->window)->setAutomaticPositionAndResizeEnabled(false);
}
}
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index c6f22aa21a..f44f63d71b 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -106,6 +106,7 @@ public:
if (QWidget *widget = q->widget())
QWidgetPrivate::get(widget)->updateContentsRect();
}
+ bool allowClickThrough(const QPoint &) const override;
};
QRectF QWidgetWindowPrivate::closestAcceptableGeometry(const QRectF &rect) const
@@ -221,6 +222,12 @@ static inline bool shouldBePropagatedToWidget(QEvent *event)
}
}
+bool QWidgetWindowPrivate::allowClickThrough(const QPoint &globalPos) const
+{
+ QWidget *w = QApplication::widgetAt(globalPos);
+ return w && !w->testAttribute(Qt::WA_MacNoClickThrough);
+}
+
bool QWidgetWindow::event(QEvent *event)
{
if (!m_widget)