summaryrefslogtreecommitdiff
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qhighdpiscaling.cpp6
-rw-r--r--src/gui/kernel/qopenglcontext_p.h2
-rw-r--r--src/gui/kernel/qwindow.cpp3
3 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp
index fccd81f8e8..7ac876838d 100644
--- a/src/gui/kernel/qhighdpiscaling.cpp
+++ b/src/gui/kernel/qhighdpiscaling.cpp
@@ -342,8 +342,10 @@ static const char scaleFactorProperty[] = "_q_scaleFactor";
*/
void QHighDpiScaling::setScreenFactor(QScreen *screen, qreal factor)
{
- m_screenFactorSet = true;
- m_active = true;
+ if (!qFuzzyCompare(factor, qreal(1))) {
+ m_screenFactorSet = true;
+ m_active = true;
+ }
screen->setProperty(scaleFactorProperty, QVariant(factor));
// hack to force re-evaluation of screen geometry
diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h
index 2fe8446c65..736f816bfe 100644
--- a/src/gui/kernel/qopenglcontext_p.h
+++ b/src/gui/kernel/qopenglcontext_p.h
@@ -264,7 +264,7 @@ public:
static QOpenGLContextPrivate *get(QOpenGLContext *context)
{
- return context->d_func();
+ return context ? context->d_func() : Q_NULLPTR;
}
#if !defined(QT_NO_DEBUG)
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index a20f4329b1..2dd5e884a4 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2502,6 +2502,9 @@ void QWindowPrivate::_q_clearAlert()
See the \l{Qt::CursorShape}{list of predefined cursor objects} for a
range of useful shapes.
+ If no cursor has been set, or after a call to unsetCursor(), the
+ parent window's cursor is used.
+
By default, the cursor has the Qt::ArrowCursor shape.
Some underlying window implementations will reset the cursor if it