Mouse cursor now properly appears after uncapture
This commit is contained in:
@@ -262,9 +262,11 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
ui->stackedWidget->mouse_capture_func(this->windowHandle());
|
ui->stackedWidget->mouse_capture_func(this->windowHandle());
|
||||||
} else {
|
} else {
|
||||||
this->releaseKeyboard();
|
this->releaseKeyboard();
|
||||||
if (ui->stackedWidget->mouse_uncapture_func)
|
if (ui->stackedWidget->mouse_uncapture_func) {
|
||||||
ui->stackedWidget->mouse_uncapture_func();
|
ui->stackedWidget->mouse_uncapture_func();
|
||||||
}
|
}
|
||||||
|
ui->stackedWidget->unsetCursor();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(qApp, &QGuiApplication::applicationStateChanged, [this](Qt::ApplicationState state) {
|
connect(qApp, &QGuiApplication::applicationStateChanged, [this](Qt::ApplicationState state) {
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ RendererStack::mouseReleaseEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
if (mouse_capture && (event->button() == Qt::MiddleButton) && (mouse_get_buttons() < 3)) {
|
if (mouse_capture && (event->button() == Qt::MiddleButton) && (mouse_get_buttons() < 3)) {
|
||||||
plat_mouse_capture(0);
|
plat_mouse_capture(0);
|
||||||
this->setCursor(Qt::ArrowCursor);
|
this->unsetCursor();
|
||||||
isMouseDown &= ~1;
|
isMouseDown &= ~1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user