Beta version 2.9.5: Fix hide workaround for media viewer.

This commit is contained in:
John Preston 2021-08-18 13:08:46 +03:00
parent 4d98230694
commit 0d449c037b

View file

@ -4518,9 +4518,10 @@ void OverlayWidget::applyHideWindowWorkaround() {
_hideWorkaround->show(); _hideWorkaround->show();
_hideWorkaround->paintRequest( _hideWorkaround->paintRequest(
) | rpl::start_with_next([=] { ) | rpl::start_with_next([=] {
QPainter(_hideWorkaround.get()).fillRect(_hideWorkaround->rect(), QColor(0, 1, 0, 1)); const auto workaround = _hideWorkaround.release();
crl::on_main(_hideWorkaround.get(), [=] { QPainter(workaround).fillRect(workaround->rect(), QColor(0, 1, 0, 1));
_hideWorkaround.reset(); crl::on_main(workaround, [=] {
delete workaround;
}); });
}, _hideWorkaround->lifetime()); }, _hideWorkaround->lifetime());
_hideWorkaround->update(); _hideWorkaround->update();