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 <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>bb10
parent
37f338e5ed
commit
078d701819
|
|
@ -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<QDri2Context *>(m_context)->resize(rect.size());
|
||||
|
|
|
|||
Loading…
Reference in New Issue