summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-09-29 12:02:10 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2010-10-01 04:42:51 (GMT)
commitf9312fec1c44097a2093b3075aa68901327eb9c5 (patch)
tree065ed73c27662ced65283cf4ad033dcb6fb2cc3a /src/gui
parent5197ca2a89ce942a8991ceec50f7be89ff72455f (diff)
downloadQt-f9312fec1c44097a2093b3075aa68901327eb9c5.zip
Qt-f9312fec1c44097a2093b3075aa68901327eb9c5.tar.gz
Qt-f9312fec1c44097a2093b3075aa68901327eb9c5.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 (cherry picked from commit 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_x11.cpp4
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())