diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-09-29 12:02:10 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-09-30 09:29:22 (GMT) |
commit | 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba (patch) | |
tree | 5dd80aeb99c48e81ad067eaaa01fdbf75c7d7aee /src/gui/kernel/qwidget_x11.cpp | |
parent | 7d5afd371d634e35192ab27f65c6dc895f7bbb5c (diff) | |
download | Qt-9e9a7bc29319d52c3e563bc2c5282cb7e6890eba.zip Qt-9e9a7bc29319d52c3e563bc2c5282cb7e6890eba.tar.gz Qt-9e9a7bc29319d52c3e563bc2c5282cb7e6890eba.tar.bz2 |
Fixes cursor shape when widget becomes native on X11.
When a native window handle is created for a widget that has override
cursor set, we should reset the cursor on the parent and set the cursor
on the new window handle.
Task-number: QTBUG-6185
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/gui/kernel/qwidget_x11.cpp')
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index e01489f..8d80e10 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -889,8 +889,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO q->setWindowOpacity(maybeTopData()->opacity/255.); } - } else if (q->testAttribute(Qt::WA_SetCursor) && q->internalWinId()) { + } else if (q->internalWinId()) { qt_x11_enforce_cursor(q); + if (QWidget *p = q->parentWidget()) // reset the cursor on the native parent + qt_x11_enforce_cursor(p); } if (extra && !extra->mask.isEmpty() && q->internalWinId()) |