mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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([=] {
|
) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
|
||||||
// Workaround Qt's forced transient parent.
|
// Workaround Qt's forced transient parent.
|
||||||
Ui::Platform::ClearTransientParent(widget());
|
Ui::Platform::ClearTransientParent(widget());
|
||||||
|
Ui::Platform::SetWindowMargins(widget(), _padding);
|
||||||
}, rp()->lifetime());
|
}, rp()->lifetime());
|
||||||
|
|
||||||
rp()->screenValue(
|
rp()->screenValue(
|
||||||
|
@ -878,6 +879,9 @@ void PipPanel::updateDecorations() {
|
||||||
_padding = padding;
|
_padding = padding;
|
||||||
_useTransparency = use;
|
_useTransparency = use;
|
||||||
widget()->setAttribute(Qt::WA_OpaquePaintEvent, !_useTransparency);
|
widget()->setAttribute(Qt::WA_OpaquePaintEvent, !_useTransparency);
|
||||||
|
if (widget()->windowHandle()) {
|
||||||
|
Ui::Platform::SetWindowMargins(widget(), _padding);
|
||||||
|
}
|
||||||
setGeometry(newGeometry);
|
setGeometry(newGeometry);
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue