xcb: Determine the window gravity just before the window is shown
It may change after the window has been created. Change-Id: Ib81a7ad7353b1909cc42684fc70d6b7d2556106f Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
parent
9f1f8aaa92
commit
c0e4f24336
@ -308,11 +308,6 @@ void QXcbWindow::create()
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine gravity from initial position. Do not change
|
||||
// later as it will cause the window to move uncontrollably.
|
||||
m_gravity = positionIncludesFrame(window()) ?
|
||||
XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC;
|
||||
|
||||
const quint32 mask = XCB_CW_BACK_PIXMAP | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | XCB_CW_EVENT_MASK;
|
||||
const quint32 values[] = {
|
||||
// XCB_CW_BACK_PIXMAP
|
||||
@ -732,6 +727,9 @@ void QXcbWindow::show()
|
||||
|
||||
xcb_set_wm_hints(xcb_connection(), m_window, &hints);
|
||||
|
||||
m_gravity = positionIncludesFrame(window()) ?
|
||||
XCB_GRAVITY_NORTH_WEST : XCB_GRAVITY_STATIC;
|
||||
|
||||
// update WM_NORMAL_HINTS
|
||||
propagateSizeHints();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user