summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp6
-rw-r--r--src/widgets/platforms/x11/qwidget_x11.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index e6a55968f9..a4c68c16a5 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -763,7 +763,8 @@ void QWidgetPrivate::updateFrameStrut()
void QWidgetPrivate::setWindowOpacity_sys(qreal level)
{
Q_Q(QWidget);
- q->windowHandle()->setOpacity(level);
+ if (q->windowHandle())
+ q->windowHandle()->setOpacity(level);
}
void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect)
@@ -788,6 +789,9 @@ QWindowSurface *QWidgetPrivate::createDefaultWindowSurface_sys()
void QWidgetPrivate::setModal_sys()
{
+ Q_Q(QWidget);
+ if (q->windowHandle())
+ q->windowHandle()->setWindowModality(q->windowModality());
}
#ifndef QT_NO_CURSOR
diff --git a/src/widgets/platforms/x11/qwidget_x11.cpp b/src/widgets/platforms/x11/qwidget_x11.cpp
index 3eec5c7331..12f4e2f856 100644
--- a/src/widgets/platforms/x11/qwidget_x11.cpp
+++ b/src/widgets/platforms/x11/qwidget_x11.cpp
@@ -134,7 +134,7 @@ enum {
};
-static QtMWMHints GetMWMHints(Display *display, Window window)
+static QtMWMHints getMWMHints(Display *display, Window window)
{
QtMWMHints mwmhints;