Apply window extents early to avoid window size changes
This commit is contained in:
parent
6732aa70e9
commit
180b0bc517
1 changed files with 5 additions and 8 deletions
|
|
@ -192,12 +192,13 @@ DefaultWindowHelper::DefaultWindowHelper(not_null<RpWidget*> window)
|
|||
}
|
||||
|
||||
void DefaultWindowHelper::init() {
|
||||
_title->show();
|
||||
|
||||
if (WindowExtentsSupported()) {
|
||||
window()->setAttribute(Qt::WA_TranslucentBackground);
|
||||
}
|
||||
|
||||
window()->createWinId();
|
||||
_title->show();
|
||||
|
||||
rpl::combine(
|
||||
window()->widthValue(),
|
||||
_windowState.value(),
|
||||
|
|
@ -260,12 +261,8 @@ void DefaultWindowHelper::init() {
|
|||
bool shown,
|
||||
bool titleShown,
|
||||
Qt::WindowStates windowState) {
|
||||
if (const auto handle = window()->windowHandle()) {
|
||||
handle->setFlag(Qt::FramelessWindowHint, titleShown);
|
||||
updateWindowExtents();
|
||||
} else {
|
||||
window()->setWindowFlag(Qt::FramelessWindowHint, titleShown);
|
||||
}
|
||||
window()->windowHandle()->setFlag(Qt::FramelessWindowHint, titleShown);
|
||||
updateWindowExtents();
|
||||
}, window()->lifetime());
|
||||
|
||||
window()->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue