Skip to content

Commit

Permalink
Remove unnessary mouse grab.
Browse files Browse the repository at this point in the history
* Causes warning spam with Qt wayland backend
* Can sometimes cause crash on wayland
* According to docs shouldn't be necesarry
  • Loading branch information
karliss committed Nov 11, 2023
1 parent 91f40f2 commit fe85af2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/widgets/ColorPicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ void ColorPicker::startPickingFromScreen()
{
if (!pickingFromScreen) {
setMouseTracking(true);
grabMouse(Qt::CursorShape::CrossCursor);
pickingFromScreen = true;
bufferColor = currColor;
}
Expand All @@ -298,7 +297,6 @@ void ColorPicker::mouseReleaseEvent(QMouseEvent *event)
setColor(getColorAtMouse());
pickingFromScreen = false;
setMouseTracking(false);
releaseMouse();
}
QWidget::mouseReleaseEvent(event);
}
Expand Down
2 changes: 0 additions & 2 deletions src/widgets/GraphView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ void GraphView::beginMouseDrag(QMouseEvent *event)
scrollBase = event->pos();
scroll_mode = true;
setCursor(Qt::ClosedHandCursor);
viewport()->grabMouse();
}

void GraphView::setViewOffset(QPoint offset)
Expand Down Expand Up @@ -741,7 +740,6 @@ void GraphView::mouseReleaseEvent(QMouseEvent *event)
if (scroll_mode && (event->buttons() & (Qt::LeftButton | Qt::MiddleButton)) == 0) {
scroll_mode = false;
setCursor(Qt::ArrowCursor);
viewport()->releaseMouse();
}
}

Expand Down

0 comments on commit fe85af2

Please sign in to comment.