Use XCB_GRAVITY_STATIC in XCB plugin for frame independent geometry.

This commit is contained in:
Samuel Rødal 2011-06-10 16:04:22 +02:00
parent 11dc006328
commit 1ee96f093a
2 changed files with 3 additions and 1 deletions

View File

@ -149,6 +149,7 @@ void QXcbWindow::create()
}; };
QRect rect = window()->geometry(); QRect rect = window()->geometry();
QPlatformWindow::setGeometry(rect);
xcb_window_t xcb_parent_id = m_screen->root(); xcb_window_t xcb_parent_id = m_screen->root();
if (parent()) if (parent())
@ -993,6 +994,7 @@ void QXcbWindow::propagateSizeHints()
xcb_size_hints_set_position(&hints, true, rect.x(), rect.y()); xcb_size_hints_set_position(&hints, true, rect.x(), rect.y());
xcb_size_hints_set_size(&hints, true, rect.width(), rect.height()); xcb_size_hints_set_size(&hints, true, rect.width(), rect.height());
xcb_size_hints_set_win_gravity(&hints, XCB_GRAVITY_STATIC);
QWindow *win = window(); QWindow *win = window();

View File

@ -273,7 +273,7 @@ void QWidgetWindow::updateGeometry()
QMargins margins = frameMargins(); QMargins margins = frameMargins();
m_widget->data->crect = geometry().translated(-margins.left(), -margins.top()); m_widget->data->crect = geometry();
m_widget->d_func()->topData()->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom()); m_widget->d_func()->topData()->frameStrut.setCoords(margins.left(), margins.top(), margins.right(), margins.bottom());
} }