mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 23:53:58 +02:00
Fix PiP drag pausing the video.
This commit is contained in:
parent
49f71f4e1e
commit
513c8d1a65
1 changed files with 18 additions and 3 deletions
|
@ -1024,7 +1024,12 @@ void Pip::handleLeave() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pip::handleMouseMove(QPoint position) {
|
void Pip::handleMouseMove(QPoint position) {
|
||||||
|
const auto weak = Ui::MakeWeak(_panel.widget());
|
||||||
|
const auto guard = gsl::finally([&] {
|
||||||
|
if (weak) {
|
||||||
_panel.handleMouseMove(position);
|
_panel.handleMouseMove(position);
|
||||||
|
}
|
||||||
|
});
|
||||||
setOverState(computeState(position));
|
setOverState(computeState(position));
|
||||||
seekUpdate(position);
|
seekUpdate(position);
|
||||||
}
|
}
|
||||||
|
@ -1086,7 +1091,12 @@ void Pip::updateActiveState(OverState was) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pip::handleMousePress(QPoint position, Qt::MouseButton button) {
|
void Pip::handleMousePress(QPoint position, Qt::MouseButton button) {
|
||||||
|
const auto weak = Ui::MakeWeak(_panel.widget());
|
||||||
|
const auto guard = gsl::finally([&] {
|
||||||
|
if (weak) {
|
||||||
_panel.handleMousePress(position, button);
|
_panel.handleMousePress(position, button);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (button != Qt::LeftButton) {
|
if (button != Qt::LeftButton) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1098,7 +1108,12 @@ void Pip::handleMousePress(QPoint position, Qt::MouseButton button) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pip::handleMouseRelease(QPoint position, Qt::MouseButton button) {
|
void Pip::handleMouseRelease(QPoint position, Qt::MouseButton button) {
|
||||||
|
const auto weak = Ui::MakeWeak(_panel.widget());
|
||||||
|
const auto guard = gsl::finally([&] {
|
||||||
|
if (weak) {
|
||||||
_panel.handleMouseRelease(position, button);
|
_panel.handleMouseRelease(position, button);
|
||||||
|
}
|
||||||
|
});
|
||||||
if (button != Qt::LeftButton) {
|
if (button != Qt::LeftButton) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue