Subject: [PATCH] Fixes cursor shape when widget becomes native on X11.
From: Denis Dzyubenko <[email-masked]>
Date: Wed, 29 Sep 2010 14:02:10 +0200

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)
---
 src/gui/kernel/qwidget_x11.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

--- a/src/gui/kernel/qwidget_x11.cpp
+++ b/src/gui/kernel/qwidget_x11.cpp
@@ -902,8 +902,10 @@ void QWidgetPrivate::create_sys(WId wind
                 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())