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) {
 | 
			
		||||
	const auto weak = Ui::MakeWeak(_panel.widget());
 | 
			
		||||
	const auto guard = gsl::finally([&] {
 | 
			
		||||
		if (weak) {
 | 
			
		||||
			_panel.handleMouseMove(position);
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
	setOverState(computeState(position));
 | 
			
		||||
	seekUpdate(position);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1086,7 +1091,12 @@ void Pip::updateActiveState(OverState was) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
	if (button != Qt::LeftButton) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -1098,7 +1108,12 @@ void Pip::handleMousePress(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);
 | 
			
		||||
		}
 | 
			
		||||
	});
 | 
			
		||||
	if (button != Qt::LeftButton) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue