diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-30 09:09:03 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-31 20:33:56 +0000 |
commit | 46fc3d3729df9e81e42f87c46907d6eb81a0c669 (patch) | |
tree | a3fff6e5a94ee3e52036d35146fa59ee893cdcc8 /src/plugins/platforms/windows/qwindowscursor.h | |
parent | e386cd03d12e401b9e3945602e9621a86009fa11 (diff) |
Windows QPA: Fix override cursor being cleared when crossing window borders
Override cursors can be modified externally when for example crossing
window borders. Add helper function to enforce the cursor again to
QWindowsWindow::applyCursor() which is called for enter events.
Task-number: QTBUG-69637
Change-Id: Ibea4da9f2aac81377002b626daae64b1102f6c2b
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscursor.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscursor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowscursor.h b/src/plugins/platforms/windows/qwindowscursor.h index 53f185358b..345f47597e 100644 --- a/src/plugins/platforms/windows/qwindowscursor.h +++ b/src/plugins/platforms/windows/qwindowscursor.h @@ -107,7 +107,8 @@ public: void changeCursor(QCursor * widgetCursor, QWindow * widget) override; void setOverrideCursor(const QCursor &cursor) override; void clearOverrideCursor() override; - bool hasOverrideCursor() const { return m_overriddenCursor != nullptr; } + static void enforceOverrideCursor(); + static bool hasOverrideCursor() { return m_overriddenCursor != nullptr; } QPoint pos() const override; void setPos(const QPoint &pos) override; @@ -143,6 +144,7 @@ private: mutable QPixmap m_ignoreDragCursor; static HCURSOR m_overriddenCursor; + static HCURSOR m_overrideCursor; }; QT_END_NAMESPACE |