mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-13 04:37:11 +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)
|
||||
&& !IsStoppedOrStopping(state.state);
|
||||
|
||||
_window->shownValue() | rpl::filter([=](bool shown) {
|
||||
return shown;
|
||||
}) | rpl::take(1) | rpl::start_with_next([=] {
|
||||
base::UpdatePowerSaveBlocker(
|
||||
_streamed->powerSaveBlocker,
|
||||
block,
|
||||
base::PowerSaveBlockType::PreventDisplaySleep,
|
||||
[] { return u"Video playback is active"_q; },
|
||||
[=] { return window(); });
|
||||
}, lifetime());
|
||||
base::UpdatePowerSaveBlocker(
|
||||
_streamed->powerSaveBlocker,
|
||||
block,
|
||||
base::PowerSaveBlockType::PreventDisplaySleep,
|
||||
[] { return u"Video playback is active"_q; },
|
||||
[=] { return _window->windowHandle(); });
|
||||
}
|
||||
|
||||
QImage OverlayWidget::transformedShownContent() const {
|
||||
|
|
Loading…
Add table
Reference in a new issue