- Wrong Cursor when widget become native on X11 (QTBUG-6185)

This commit is contained in:
Rex Dieter 2010-09-30 08:36:36 -05:00
parent e5e6464e83
commit 2547722966
2 changed files with 44 additions and 3 deletions

View File

@ -0,0 +1,34 @@
From 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba Mon Sep 17 00:00:00 2001
From: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Date: Wed, 29 Sep 2010 14:02:10 +0200
Subject: [PATCH] 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
---
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())
--
1.6.1

13
qt.spec
View File

@ -18,7 +18,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.7.0
Release: 4%{?dist}
Release: 5%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@ -81,8 +81,11 @@ Patch62: qt-4.6.3-indic-rendering-bz636399.patch
# security patches
# upstream patches
## upstream patches
Patch100: qt-everywhere-opensource-src-4.7.0-QTBUG-13567-QTreeView.patch
# http://bugreports.qt.nokia.com/browse/QTBUG-6185
# http://qt.gitorious.org/qt/staging/commit/9e9a7bc29319d52c3e563bc2c5282cb7e6890eba
Patch101: qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch
# kde-qt git patches
Patch202: 0002-This-patch-makes-override-redirect-windows-popup-men.patch
@ -437,6 +440,7 @@ Qt libraries used for drawing widgets and OpenGL items.
# upstream patches
%patch100 -p1 -b .QTBUG-13567-QTreeView
%patch101 -p1 -b .QTBUG-6185
# kde-qt branch
%if 0%{?kde_qt}
@ -1097,8 +1101,11 @@ fi
%changelog
* Thu Sep 30 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.7.0-5
- Wrong Cursor when widget become native on X11 (QTBUG-6185)
* Mon Sep 27 2010 Than Ngo <than@redhat.com> - 4.7.0-4
- apply upstream patch to fix QTreeView-regression
- apply upstream patch to fix QTreeView-regression (QTBUG-13567)
* Thu Sep 23 2010 Than Ngo <than@redhat.com> - 4.7.0-3
- fix typo in license