summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-02 09:49:31 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-06-13 06:13:39 +0000
commitb05d1c2ebfebf0f427a92668c0a7b177d0952012 (patch)
tree53bbf9a22cd2190984c4c348cbbc0102ce62bb11 /src/plugins/platforms/windows/qwindowsintegration.cpp
parent8b23133e50b01dd1daf53b0e7561719c17a043d6 (diff)
QPlatformCursor: Add functions for setting/clearing override cursors
QPA is modeled on the assumption that the cursor is a property of the window and therefore sets the override cursors on all windows. However, on macOS and Windows, the cursor is set per application (or screen). On these platforms, the per window cursor setting needs to be emulated which is a source of bugs especially for override cursors. Add new virtuals to QPlatformCursor allowing to set override cursors which can be implemented by directly setting the cursor on those platforms. Task-number: QTBUG-40122 Task-number: QTBUG-61133 Change-Id: I31d6a927128d22bb1620a8ace35988c0e126236e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 6c8fccf350..eb7ad5ecd8 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -72,6 +72,7 @@
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qhighdpiscaling_p.h>
#include <QtGui/qpa/qplatforminputcontextfactory_p.h>
+#include <QtGui/qpa/qplatformcursor.h>
#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
@@ -242,6 +243,7 @@ QWindowsIntegrationPrivate::QWindowsIntegrationPrivate(const QStringList &paramL
}
m_context.initTouch(m_options);
+ QPlatformCursor::setCapability(QPlatformCursor::OverrideCursor);
}
QWindowsIntegrationPrivate::~QWindowsIntegrationPrivate()