Fixed incorrect reporting of child window geometry in xcb plugin.
authorSamuel Rødal <samuel.rodal@nokia.com>
Thu, 15 Mar 2012 09:18:27 +0000 (10:18 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 15 Mar 2012 10:40:50 +0000 (11:40 +0100)
We should only query the position for top levels, otherwise trust the
position given in the event.

Change-Id: Ic29f25983af3e2c2f27eeb527c08069435ac938c
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
src/plugins/platforms/xcb/qxcbwindow.cpp

index 54b3b21..4de3734 100644 (file)
@@ -1307,7 +1307,7 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
 {
     bool fromSendEvent = (event->response_type & 0x80);
     QPoint pos(event->x, event->y);
-    if (!fromSendEvent) {
+    if (!parent() && !fromSendEvent) {
         // Do not trust the position, query it instead.
         xcb_translate_coordinates_cookie_t cookie = xcb_translate_coordinates(xcb_connection(), xcb_window(),
                                                                               m_screen->root(), 0, 0);