mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Delay clearing transient parent until the pip window is really exposed
This commit is contained in:
parent
9ca9904732
commit
8d0d9bb0bd
1 changed files with 8 additions and 4 deletions
|
@ -351,10 +351,14 @@ void PipPanel::init() {
|
||||||
widget()->resize(0, 0);
|
widget()->resize(0, 0);
|
||||||
widget()->hide();
|
widget()->hide();
|
||||||
|
|
||||||
rp()->shownValue(
|
rpl::merge(
|
||||||
) | rpl::filter([=](bool shown) {
|
rp()->shownValue() | rpl::to_empty,
|
||||||
return shown;
|
rp()->paintRequest() | rpl::to_empty
|
||||||
}) | rpl::start_with_next([=] {
|
) | rpl::map([=] {
|
||||||
|
return widget()->windowHandle()
|
||||||
|
&& widget()->windowHandle()->isExposed();
|
||||||
|
}) | rpl::distinct_until_changed(
|
||||||
|
) | 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());
|
||||||
}, rp()->lifetime());
|
}, rp()->lifetime());
|
||||||
|
|
Loading…
Add table
Reference in a new issue