mirror of
https://github.com/rizinorg/cutter.git
synced 2024-11-23 04:49:49 +00:00
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:
parent
91f40f2f71
commit
fe85af2560
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user