From 078d7018199eee1cb2850f077f12aa95bf328e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 22 Sep 2011 09:00:55 +0200 Subject: Only set frame margins as dirty when we get a configure notify event. It's dangerous to set them as dirty in anticipation of a configure notify event, as if frameMargins() is called before the event is received the computed values are bogus. Change-Id: Ib6db975fba5fcb13a2511e4716cbb5ca79265c34 Reviewed-on: http://codereview.qt-project.org/5365 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/plugins/platforms/xcb/qxcbwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 5458674ae2..56c5c4836f 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -139,7 +139,6 @@ void QXcbWindow::create() destroy(); m_windowState = Qt::WindowNoState; - m_dirtyFrameMargins = true; Qt::WindowType type = window()->windowType(); @@ -457,8 +456,6 @@ void QXcbWindow::show() free(error); } - m_dirtyFrameMargins = true; - if (window()->windowState() & Qt::WindowMinimized) xcb_wm_hints_set_iconic(&hints); else @@ -774,8 +771,6 @@ Qt::WindowState QXcbWindow::setWindowState(Qt::WindowState state) if (state == m_windowState) return state; - m_dirtyFrameMargins = true; - // unset old state switch (m_windowState) { case Qt::WindowMinimized: @@ -1175,6 +1170,8 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t * QPlatformWindow::setGeometry(rect); QWindowSystemInterface::handleGeometryChange(window(), rect); + m_dirtyFrameMargins = true; + #if XCB_USE_DRI2 if (m_context) static_cast(m_context)->resize(rect.size()); -- cgit v1.2.3