diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-09-21 17:39:34 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-23 11:30:38 +0200 |
commit | 37f338e5edc6d7b70b5a4eaf63326f2a22d7bfbd (patch) | |
tree | b6569abeaead0044fcb9c5dca331bbfc9c02f827 /src/plugins/platforms/xcb/qxcbwindow.cpp | |
parent | d8784cd3930eca664009bbccdbb4fa0ebd42b3a0 (diff) |
Fixed geometry issues.
We need to compare against the window's currently known geometry to know
when to send resize and move events. Also make sure at least one resize
event is sent, instead of sending one before each expose.
Change-Id: Id7ebe4c1c0e723af9198c668a0c736d64efdbf3e
Reviewed-on: http://codereview.qt-project.org/5364
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index cde450e8e6..5458674ae2 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -343,6 +343,8 @@ void QXcbWindow::setGeometry(const QRect &rect) qBound(1, rect.height(), XCOORD_MAX) }; Q_XCB_CALL(xcb_configure_window(xcb_connection(), m_window, mask, values)); + + xcb_flush(xcb_connection()); } QMargins QXcbWindow::frameMargins() const @@ -1168,15 +1170,7 @@ void QXcbWindow::handleClientMessageEvent(const xcb_client_message_event_t *even void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event) { - int xpos = geometry().x(); - int ypos = geometry().y(); - - if ((event->width == geometry().width() && event->height == geometry().height()) || event->x != 0 || event->y != 0) { - xpos = event->x; - ypos = event->y; - } - - QRect rect(xpos, ypos, event->width, event->height); + QRect rect(event->x, event->y, event->width, event->height); QPlatformWindow::setGeometry(rect); QWindowSystemInterface::handleGeometryChange(window(), rect); |