diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-14 15:26:15 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-14 15:26:15 (GMT) |
commit | fba5fce6723a739aec73ef5184ccb6cc425402fe (patch) | |
tree | 8d9ca16895cdb5be8958776e682d0ca453468baf /src/gui | |
parent | 3b2bd144b7873daf2e7119248dbac7c0f0253993 (diff) | |
download | Qt-fba5fce6723a739aec73ef5184ccb6cc425402fe.zip Qt-fba5fce6723a739aec73ef5184ccb6cc425402fe.tar.gz Qt-fba5fce6723a739aec73ef5184ccb6cc425402fe.tar.bz2 |
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@nokia.com>
This reverts commit cdd776a91e65bf5c30cea1bab9823134a3f797d0.
Diffstat (limited to 'src/gui')
-rw-r--r-- | 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); } |