mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +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()->hide();
|
||||
|
||||
rp()->shownValue(
|
||||
) | rpl::filter([=](bool shown) {
|
||||
return shown;
|
||||
}) | rpl::start_with_next([=] {
|
||||
rpl::merge(
|
||||
rp()->shownValue() | rpl::to_empty,
|
||||
rp()->paintRequest() | rpl::to_empty
|
||||
) | 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.
|
||||
Ui::Platform::ClearTransientParent(widget());
|
||||
}, rp()->lifetime());
|
||||
|
|
Loading…
Add table
Reference in a new issue