[qt] Fixes the position of misplaced mouse input (QTBUG-22420)

Jaroslav Reznik jreznik at fedoraproject.org
Mon Dec 12 15:22:08 UTC 2011


commit 420aafa825b6365614a8bcecf83a0b3789e7a86b
Author: Jaroslav Reznik <jreznik at redhat.com>
Date:   Mon Dec 12 16:21:59 2011 +0100

    Fixes the position of misplaced mouse input (QTBUG-22420)

 ...c-4.8.0-QTBUG-22420-revert-x11-map-global.patch |   65 ++++++++++++++++++++
 qt.spec                                            |    9 +++-
 2 files changed, 73 insertions(+), 1 deletions(-)
---
diff --git a/qt-everywhere-opensource-src-4.8.0-QTBUG-22420-revert-x11-map-global.patch b/qt-everywhere-opensource-src-4.8.0-QTBUG-22420-revert-x11-map-global.patch
new file mode 100644
index 0000000..216ae49
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.0-QTBUG-22420-revert-x11-map-global.patch
@@ -0,0 +1,65 @@
+From fba5fce6723a739aec73ef5184ccb6cc425402fe Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint <Friedemann.Kleint at nokia.com>
+Date: Mon, 14 Nov 2011 16:26:15 +0100
+Subject: [PATCH] Revert "Improved performance of mapFromGlobal/mapToGlobal on
+ X11"
+
+The change introduces problems with Unity's global menu bar.
+
+Task-number: QTBUG-22420
+
+Reviewed-by: denis <denis.dzyubenko at nokia.com>
+
+This reverts commit cdd776a91e65bf5c30cea1bab9823134a3f797d0.
+---
+ src/gui/kernel/qwidget_x11.cpp |   28 ----------------------------
+ 1 files changed, 0 insertions(+), 28 deletions(-)
+
+diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
+index f99cc2c..52e3046 100644
+--- a/src/gui/kernel/qwidget_x11.cpp
++++ b/src/gui/kernel/qwidget_x11.cpp
+@@ -1336,40 +1336,12 @@ QPoint QWidgetPrivate::mapFromGlobal(const QPoint &pos) const
+ QPoint QWidget::mapToGlobal(const QPoint &pos) const
+ {
+     Q_D(const QWidget);
+-    QPoint offset = data->crect.topLeft();
+-    const QWidget *w = this;
+-    const QWidget *p = w->parentWidget();
+-    while (!w->isWindow() && p) {
+-        w = p;
+-        p = p->parentWidget();
+-        offset += w->data->crect.topLeft();
+-    }
+-
+-    const QWidgetPrivate *wd = w->d_func();
+-    QTLWExtra *tlw = wd->topData();
+-    if (!tlw->embedded)
+-        return pos + offset;
+-
+     return d->mapToGlobal(pos);
+ }
+ 
+ QPoint QWidget::mapFromGlobal(const QPoint &pos) const
+ {
+     Q_D(const QWidget);
+-    QPoint offset = data->crect.topLeft();
+-    const QWidget *w = this;
+-    const QWidget *p = w->parentWidget();
+-    while (!w->isWindow() && p) {
+-        w = p;
+-        p = p->parentWidget();
+-        offset += w->data->crect.topLeft();
+-    }
+-
+-    const QWidgetPrivate *wd = w->d_func();
+-    QTLWExtra *tlw = wd->topData();
+-    if (!tlw->embedded)
+-        return pos - offset;
+-
+     return d->mapFromGlobal(pos);
+ }
+ 
+-- 
+1.7.6
+
diff --git a/qt.spec b/qt.spec
index 8de43d1..b4f2ca1 100644
--- a/qt.spec
+++ b/qt.spec
@@ -11,7 +11,7 @@ Summary: Qt toolkit
 Name:    qt
 Epoch:   1
 Version: 4.8.0
-Release: 0.28.rc1%{?dist}
+Release: 0.29.rc1%{?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
@@ -104,6 +104,9 @@ Patch75: qt-ppc64-crash.patch
 # Applications crash when using a visual with 24 bits per pixel 
 # https://bugreports.qt.nokia.com/browse/QTBUG-21754
 Patch100: qt-everywhere-opensource-src-4.8.0-QTBUG-21754.patch
+# Revert "Improved performance of mapFromGlobal/mapToGlobal on X11" (QTBUG-22420)
+# Fixes the position of misplaced mouse input
+Patch101: qt-everywhere-opensource-src-4.8.0-QTBUG-22420-revert-x11-map-global.patch
 
 # security patches
 
@@ -432,6 +435,7 @@ popd
 
 # upstream patches
 %patch100 -p1 -b .QTBUG-21754
+%patch101 -p1 -b .QTBUG-22420-revert-x11-map-global.patch
 
 # security fixes
 
@@ -1065,6 +1069,9 @@ fi
 
 
 %changelog
+* Mon Dec 12 2011 Jaroslav Reznik <jreznik at redhat.com> 4.8.0-0.29.rc1
+- Fixes the position of misplaced mouse input (QTBUG-22420)
+
 * Sun Dec 04 2011 Rex Dieter <rdieter at fedoraproject.org> 4.8.0-0.28.rc1
 - Control whether icu support is built (#759923)
 


More information about the scm-commits mailing list