From ae25e6be41aaba90507022d792e2defcaf4cbfb6 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 7 Feb 2011 16:42:35 +0100 Subject: Removed obsolete code that was incorrectly handling ConfigureNotify The code in question was calling XSync and then processing ConfigureNotify requests, but only using the width/height information from the event, while ignoring the x,y properties. The code was consuming synthetic ConfigureNotify with x,y in root coordinate system that we are supposed to receive from the window manager, which broke mapFromGlobal/mapToGlobal behavior (after cdd776a91e65bf5c30cea1bab9823134a3f797d0) Reviewed-by: Olivier Goffart --- src/gui/kernel/qapplication_x11.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index 2c51722..823f1b1 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -5314,18 +5314,6 @@ bool QETWidget::translateConfigEvent(const XEvent *event) } if (wasResize) { - static bool slowResize = qgetenv("QT_SLOW_TOPLEVEL_RESIZE").toInt(); - if (d->extra->compress_events && !slowResize && !data->in_show && isVisible()) { - QApplication::syncX(); - XEvent otherEvent; - while (XCheckTypedWindowEvent(X11->display, internalWinId(), ConfigureNotify, &otherEvent) - && !qt_x11EventFilter(&otherEvent) && !x11Event(&otherEvent) - && otherEvent.xconfigure.event == otherEvent.xconfigure.window) { - data->crect.setWidth(otherEvent.xconfigure.width); - data->crect.setHeight(otherEvent.xconfigure.height); - } - } - if (isVisible() && data->crect.size() != oldSize) { Q_ASSERT(d->extra->topextra); QWidgetBackingStore *bs = d->extra->topextra->backingStore.data(); @@ -5334,7 +5322,7 @@ bool QETWidget::translateConfigEvent(const XEvent *event) // resize optimization in order to get invalidated regions for resized widgets. // The optimization discards all invalidateBuffer() calls since we're going to // repaint everything anyways, but that's not the case with static contents. - if (!slowResize && !hasStaticContents) + if (!hasStaticContents) d->extra->topextra->inTopLevelResize = true; QResizeEvent e(data->crect.size(), oldSize); QApplication::sendSpontaneousEvent(this, &e); -- cgit v0.12