summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qshortcut.cpp7
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp7
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp9
3 files changed, 7 insertions, 16 deletions
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index f7f7cf1039..dcf6aed591 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -279,13 +279,12 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
// (and reaches this point), then the menu item itself has been disabled.
// This occurs at the QPA level on Mac, were we disable all the Cocoa menus
// when showing a modal window.
- Q_UNUSED(menu);
- continue;
-#else
+ if (a->shortcut().count() <= 1)
+ continue;
+#endif
QAction *a = menu->menuAction();
if (correctActionContext(context, a, active_window))
return true;
-#endif
} else
#endif
if (correctWidgetContext(context, w, active_window))
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 3281e0c6f7..0fd794cc02 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -118,11 +118,12 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
win->resize(q->size());
win->setScreen(QGuiApplication::screens().value(topData()->screenIndex, 0));
- if (q->testAttribute(Qt::WA_TranslucentBackground)) {
- QSurfaceFormat format;
+ QSurfaceFormat format = win->requestedFormat();
+ if ((flags & Qt::Window) && win->surfaceType() != QSurface::OpenGLSurface
+ && q->testAttribute(Qt::WA_TranslucentBackground)) {
format.setAlphaBufferSize(8);
- win->setFormat(format);
}
+ win->setFormat(format);
if (QWidget *nativeParent = q->nativeParentWidget()) {
if (nativeParent->windowHandle()) {
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 9fcd14e813..8e3e2a00b0 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -66,15 +66,6 @@ QT_BEGIN_NAMESPACE
extern QRegion qt_dirtyRegion(QWidget *);
-/*
- A version of QRect::intersects() that does not normalize the rects.
-*/
-static inline bool qRectIntersects(const QRect &r1, const QRect &r2)
-{
- return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right())
- && qMax(r1.top(), r2.top()) <= qMin(r1.bottom(), r2.bottom()));
-}
-
/**
* Flushes the contents of the \a backingStore into the screen area of \a widget.
* \a tlwOffset is the position of the top level widget relative to the window surface.