Windows QPA: Fix override cursor not working when re-entering the window
Return early from QWindowsWindow::applyCursor() when an override cursor is set. Task-number: QTBUG-67467 Change-Id: I0d3ceead8bbbd3c6295c216a944a1ef15b6f8190 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>bb10
parent
f2fd5f390c
commit
2823cc6d4b
|
|
@ -107,6 +107,7 @@ public:
|
|||
void changeCursor(QCursor * widgetCursor, QWindow * widget) override;
|
||||
void setOverrideCursor(const QCursor &cursor) override;
|
||||
void clearOverrideCursor() override;
|
||||
bool hasOverrideCursor() const { return m_overriddenCursor != nullptr; }
|
||||
|
||||
QPoint pos() const override;
|
||||
void setPos(const QPoint &pos) override;
|
||||
|
|
|
|||
|
|
@ -2410,6 +2410,8 @@ static inline bool applyNewCursor(const QWindow *w)
|
|||
|
||||
void QWindowsWindow::applyCursor()
|
||||
{
|
||||
if (static_cast<const QWindowsCursor *>(screen()->cursor())->hasOverrideCursor())
|
||||
return;
|
||||
#ifndef QT_NO_CURSOR
|
||||
if (m_cursor->isNull()) { // Recurse up to parent with non-null cursor. Set default for toplevel.
|
||||
if (const QWindow *p = window()->parent()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue