mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Fixed changing volume and seeking video in windowed media viewer.
This commit is contained in:
parent
63c390c505
commit
30ae879fb3
3 changed files with 13 additions and 2 deletions
Telegram/SourceFiles/media/view
|
@ -550,7 +550,7 @@ void OverlayWidget::setupWindow() {
|
|||
return Flag::None | Flag(0);
|
||||
}
|
||||
const auto inControls = (_over != OverNone) && (_over != OverVideo);
|
||||
if (inControls) {
|
||||
if (inControls || (_streamed && _streamed->controls.dragging())) {
|
||||
return Flag::None | Flag(0);
|
||||
}
|
||||
return Flag::Move | Flag(0);
|
||||
|
@ -2810,7 +2810,6 @@ void OverlayWidget::show(OpenRequest request) {
|
|||
const auto contextTopicRootId = request.topicRootId();
|
||||
if (!request.continueStreaming() && !request.startTime()) {
|
||||
if (_message && (_message == contextItem)) {
|
||||
_message = nullptr;
|
||||
return close();
|
||||
} else if (_user && (_user == contextPeer)) {
|
||||
if ((_photo && (_photo == photo))
|
||||
|
@ -5237,6 +5236,7 @@ Window::SessionController *OverlayWidget::findWindow(bool switchTo) const {
|
|||
|
||||
// #TODO unite and check
|
||||
void OverlayWidget::clearBeforeHide() {
|
||||
_message = nullptr;
|
||||
_sharedMedia = nullptr;
|
||||
_sharedMediaData = std::nullopt;
|
||||
_sharedMediaDataKey = std::nullopt;
|
||||
|
|
|
@ -590,6 +590,16 @@ bool PlaybackControls::hasMenu() const {
|
|||
return _menu != nullptr;
|
||||
}
|
||||
|
||||
bool PlaybackControls::dragging() const {
|
||||
return _volumeController->isChanging()
|
||||
|| _playbackSlider->isChanging()
|
||||
|| _playPauseResume->isOver()
|
||||
|| _volumeToggle->isOver()
|
||||
|| _menuToggle->isOver()
|
||||
|| _fullScreenToggle->isOver()
|
||||
|| _pictureInPicture->isOver();
|
||||
}
|
||||
|
||||
PlaybackControls::~PlaybackControls() = default;
|
||||
|
||||
} // namespace View
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
void setLoadingProgress(int64 ready, int64 total);
|
||||
void setInFullScreen(bool inFullScreen);
|
||||
[[nodiscard]] bool hasMenu() const;
|
||||
[[nodiscard]] bool dragging() const;
|
||||
|
||||
~PlaybackControls();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue