Remove unnessary mouse grab.

* Causes warning spam with Qt wayland backend
* Can sometimes cause crash on wayland
* According to docs shouldn't be necesarry
This commit is contained in:
Karliss 2023-11-09 21:55:52 +02:00 committed by karliss
parent 91f40f2f71
commit fe85af2560
2 changed files with 0 additions and 4 deletions

View File

@ -286,7 +286,6 @@ void ColorPicker::startPickingFromScreen()
{ {
if (!pickingFromScreen) { if (!pickingFromScreen) {
setMouseTracking(true); setMouseTracking(true);
grabMouse(Qt::CursorShape::CrossCursor);
pickingFromScreen = true; pickingFromScreen = true;
bufferColor = currColor; bufferColor = currColor;
} }
@ -298,7 +297,6 @@ void ColorPicker::mouseReleaseEvent(QMouseEvent *event)
setColor(getColorAtMouse()); setColor(getColorAtMouse());
pickingFromScreen = false; pickingFromScreen = false;
setMouseTracking(false); setMouseTracking(false);
releaseMouse();
} }
QWidget::mouseReleaseEvent(event); QWidget::mouseReleaseEvent(event);
} }

View File

@ -159,7 +159,6 @@ void GraphView::beginMouseDrag(QMouseEvent *event)
scrollBase = event->pos(); scrollBase = event->pos();
scroll_mode = true; scroll_mode = true;
setCursor(Qt::ClosedHandCursor); setCursor(Qt::ClosedHandCursor);
viewport()->grabMouse();
} }
void GraphView::setViewOffset(QPoint offset) void GraphView::setViewOffset(QPoint offset)
@ -741,7 +740,6 @@ void GraphView::mouseReleaseEvent(QMouseEvent *event)
if (scroll_mode && (event->buttons() & (Qt::LeftButton | Qt::MiddleButton)) == 0) { if (scroll_mode && (event->buttons() & (Qt::LeftButton | Qt::MiddleButton)) == 0) {
scroll_mode = false; scroll_mode = false;
setCursor(Qt::ArrowCursor); setCursor(Qt::ArrowCursor);
viewport()->releaseMouse();
} }
} }