Explorar o código

Set proper source relative X,Y coords on wheel interaction

John Bradley %!s(int64=11) %!d(string=hai) anos
pai
achega
c62a0059ed
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      obs/window-basic-interaction.cpp

+ 4 - 1
obs/window-basic-interaction.cpp

@@ -347,7 +347,10 @@ bool OBSBasicInteraction::HandleMouseWheelEvent(QWheelEvent *event)
 			yDelta = event->delta();
 	}
 
-	obs_source_send_mouse_wheel(source, &mouseEvent, xDelta, yDelta);
+	if (GetSourceRelativeXY(event->x(), event->y(), mouseEvent.x,
+			mouseEvent.y))
+		obs_source_send_mouse_wheel(source, &mouseEvent, xDelta,
+				yDelta);
 
 	return true;
 }