mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
parent
558daa3382
commit
715dff0a3e
1 changed files with 6 additions and 10 deletions
|
@ -3841,16 +3841,12 @@ void OverlayWidget::updatePowerSaveBlocker(
|
||||||
&& !IsPausedOrPausing(state.state)
|
&& !IsPausedOrPausing(state.state)
|
||||||
&& !IsStoppedOrStopping(state.state);
|
&& !IsStoppedOrStopping(state.state);
|
||||||
|
|
||||||
_window->shownValue() | rpl::filter([=](bool shown) {
|
|
||||||
return shown;
|
|
||||||
}) | rpl::take(1) | rpl::start_with_next([=] {
|
|
||||||
base::UpdatePowerSaveBlocker(
|
base::UpdatePowerSaveBlocker(
|
||||||
_streamed->powerSaveBlocker,
|
_streamed->powerSaveBlocker,
|
||||||
block,
|
block,
|
||||||
base::PowerSaveBlockType::PreventDisplaySleep,
|
base::PowerSaveBlockType::PreventDisplaySleep,
|
||||||
[] { return u"Video playback is active"_q; },
|
[] { return u"Video playback is active"_q; },
|
||||||
[=] { return window(); });
|
[=] { return _window->windowHandle(); });
|
||||||
}, lifetime());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage OverlayWidget::transformedShownContent() const {
|
QImage OverlayWidget::transformedShownContent() const {
|
||||||
|
|
Loading…
Add table
Reference in a new issue