mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Communicate PiP window margins to the OS
This commit is contained in:
parent
6f23010382
commit
ec6862d31a
1 changed files with 4 additions and 0 deletions
|
@ -362,6 +362,7 @@ void PipPanel::init() {
|
|||
) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
|
||||
// Workaround Qt's forced transient parent.
|
||||
Ui::Platform::ClearTransientParent(widget());
|
||||
Ui::Platform::SetWindowMargins(widget(), _padding);
|
||||
}, rp()->lifetime());
|
||||
|
||||
rp()->screenValue(
|
||||
|
@ -878,6 +879,9 @@ void PipPanel::updateDecorations() {
|
|||
_padding = padding;
|
||||
_useTransparency = use;
|
||||
widget()->setAttribute(Qt::WA_OpaquePaintEvent, !_useTransparency);
|
||||
if (widget()->windowHandle()) {
|
||||
Ui::Platform::SetWindowMargins(widget(), _padding);
|
||||
}
|
||||
setGeometry(newGeometry);
|
||||
update();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue