UI: Fix Qt 6 position deprecations

This commit is contained in:
gxalpha
2022-07-19 16:12:17 +02:00
committed by Ryan Foster
parent 49e37db952
commit 05c6a408e3
7 changed files with 53 additions and 21 deletions

View File

@@ -319,8 +319,9 @@ bool OBSBasicInteraction::HandleMouseClickEvent(QMouseEvent *event)
//if (event->flags().testFlag(Qt::MouseEventCreatedDoubleClick))
// clickCount = 2;
bool insideSource = GetSourceRelativeXY(event->x(), event->y(),
mouseEvent.x, mouseEvent.y);
QPoint pos = event->pos();
bool insideSource = GetSourceRelativeXY(pos.x(), pos.y(), mouseEvent.x,
mouseEvent.y);
if (mouseUp || insideSource)
obs_source_send_mouse_click(source, &mouseEvent, button,
@@ -337,7 +338,8 @@ bool OBSBasicInteraction::HandleMouseMoveEvent(QMouseEvent *event)
if (!mouseLeave) {
mouseEvent.modifiers = TranslateQtMouseEventModifiers(event);
mouseLeave = !GetSourceRelativeXY(event->x(), event->y(),
QPoint pos = event->pos();
mouseLeave = !GetSourceRelativeXY(pos.x(), pos.y(),
mouseEvent.x, mouseEvent.y);
}