Use XCB_GRAVITY_STATIC in XCB plugin for frame independent geometry.
This commit is contained in:
parent
11dc006328
commit
1ee96f093a
@ -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();
|
||||||
|
|
||||||
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user