diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-02-07 16:56:43 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2011-02-07 16:56:43 (GMT) |
commit | 4cc2c1d87a90279cd024768c905da013f037cea1 (patch) | |
tree | 4384ae66da5d6a45c1f6e9af41909f9c4fc7198e | |
parent | 2b72330127cf045d324bc20dfbc9fac2d12c6cdb (diff) | |
download | Qt-4cc2c1d87a90279cd024768c905da013f037cea1.zip Qt-4cc2c1d87a90279cd024768c905da013f037cea1.tar.gz Qt-4cc2c1d87a90279cd024768c905da013f037cea1.tar.bz2 |
Revert "Improved performance of mapFromGlobal/mapToGlobal on X11"
This change introduced regressions with some window managers
(for example with metacity when you maximize the window)
This reverts commit cdd776a91e65bf5c30cea1bab9823134a3f797d0.
-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 28eb3f0..b0375ef 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1318,40 +1318,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); } |