Skip to content

Commit

Permalink
Change FramelessWindowHint not only when the window is shown
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Jun 22, 2022
1 parent adf267a commit 941dc48
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ui/platform/ui_platform_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ DefaultWindowHelper::DefaultWindowHelper(not_null<RpWidget*> window)

void DefaultWindowHelper::init() {
_title->show();
window()->setWindowFlag(Qt::FramelessWindowHint);

if (WindowExtentsSupported()) {
window()->setAttribute(Qt::WA_TranslucentBackground);
Expand Down Expand Up @@ -268,10 +267,8 @@ void DefaultWindowHelper::init() {
bool shown,
bool titleShown,
Qt::WindowStates windowState) {
if (shown) {
window()->windowHandle()->setFlag(Qt::FramelessWindowHint, titleShown);
updateWindowExtents();
}
window()->windowHandle()->setFlag(Qt::FramelessWindowHint, titleShown);
updateWindowExtents();
}, window()->lifetime());

window()->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
Expand Down

0 comments on commit 941dc48

Please sign in to comment.