Change FramelessWindowHint not only when the window is shown
This commit is contained in:
parent
adf267a3a2
commit
941dc48366
1 changed files with 2 additions and 5 deletions
|
|
@ -200,7 +200,6 @@ DefaultWindowHelper::DefaultWindowHelper(not_null<RpWidget*> window)
|
||||||
|
|
||||||
void DefaultWindowHelper::init() {
|
void DefaultWindowHelper::init() {
|
||||||
_title->show();
|
_title->show();
|
||||||
window()->setWindowFlag(Qt::FramelessWindowHint);
|
|
||||||
|
|
||||||
if (WindowExtentsSupported()) {
|
if (WindowExtentsSupported()) {
|
||||||
window()->setAttribute(Qt::WA_TranslucentBackground);
|
window()->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
@ -268,10 +267,8 @@ void DefaultWindowHelper::init() {
|
||||||
bool shown,
|
bool shown,
|
||||||
bool titleShown,
|
bool titleShown,
|
||||||
Qt::WindowStates windowState) {
|
Qt::WindowStates windowState) {
|
||||||
if (shown) {
|
window()->windowHandle()->setFlag(Qt::FramelessWindowHint, titleShown);
|
||||||
window()->windowHandle()->setFlag(Qt::FramelessWindowHint, titleShown);
|
updateWindowExtents();
|
||||||
updateWindowExtents();
|
|
||||||
}
|
|
||||||
}, window()->lifetime());
|
}, window()->lifetime());
|
||||||
|
|
||||||
window()->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
window()->events() | rpl::start_with_next([=](not_null<QEvent*> e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue