Skip to content

Commit ec6862d

Browse files
ilya-fedinjohn-preston
authored andcommitted
Communicate PiP window margins to the OS
1 parent 6f23010 commit ec6862d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Telegram/SourceFiles/media/view/media_view_pip.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ void PipPanel::init() {
362362
) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
363363
// Workaround Qt's forced transient parent.
364364
Ui::Platform::ClearTransientParent(widget());
365+
Ui::Platform::SetWindowMargins(widget(), _padding);
365366
}, rp()->lifetime());
366367

367368
rp()->screenValue(
@@ -878,6 +879,9 @@ void PipPanel::updateDecorations() {
878879
_padding = padding;
879880
_useTransparency = use;
880881
widget()->setAttribute(Qt::WA_OpaquePaintEvent, !_useTransparency);
882+
if (widget()->windowHandle()) {
883+
Ui::Platform::SetWindowMargins(widget(), _padding);
884+
}
881885
setGeometry(newGeometry);
882886
update();
883887
}

0 commit comments

Comments
 (0)