浏览代码

Set proper source relative X,Y coords on wheel interaction

John Bradley 11 年之前
父节点
当前提交
c62a0059ed
共有 1 个文件被更改,包括 4 次插入1 次删除
  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;
 }