Fixed mouse hiding in OverlayWidget when menu of controls is displayed.

This commit is contained in:
23rd 2021-01-30 16:25:40 +03:00 committed by John Preston
parent 813470ff25
commit 4695ccfdb8
3 changed files with 6 additions and 0 deletions

View File

@ -1274,6 +1274,7 @@ void OverlayWidget::activateControls() {
void OverlayWidget::onHideControls(bool force) {
if (!force) {
if (!_dropdown->isHidden()
|| (_streamed && _streamed->controls.hasMenu())
|| _menu
|| _mousePressed
|| (_fullScreenVideo

View File

@ -568,6 +568,10 @@ void PlaybackControls::mousePressEvent(QMouseEvent *e) {
e->accept(); // Don't pass event to the Media::View::OverlayWidget.
}
bool PlaybackControls::hasMenu() const {
return _menu != nullptr;
}
PlaybackControls::~PlaybackControls() = default;
} // namespace View

View File

@ -57,6 +57,7 @@ public:
void updatePlayback(const Player::TrackState &state);
void setLoadingProgress(int ready, int total);
void setInFullScreen(bool inFullScreen);
[[nodiscard]] bool hasMenu() const;
~PlaybackControls();