Cursor override fixes and preparation for overscan checking
This commit is contained in:
@@ -205,7 +205,8 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
|
||||
connect(this, &MainWindow::hardResetCompleted, this, [this]() {
|
||||
ui->actionMCA_devices->setVisible(machine_has_bus(machine, MACHINE_BUS_MCA));
|
||||
QApplication::setOverrideCursor(Qt::ArrowCursor);
|
||||
while (QApplication::overrideCursor())
|
||||
QApplication::restoreOverrideCursor();
|
||||
#ifdef USE_WACOM
|
||||
ui->menuTablet_tool->menuAction()->setVisible(mouse_input_mode >= 1);
|
||||
#else
|
||||
|
@@ -114,7 +114,8 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index)
|
||||
|
||||
RendererStack::~RendererStack()
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
while (QApplication::overrideCursor())
|
||||
QApplication::restoreOverrideCursor();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -123,7 +124,7 @@ qt_mouse_capture(int on)
|
||||
{
|
||||
if (!on) {
|
||||
mouse_capture = 0;
|
||||
if (QApplication::overrideCursor()) QApplication::restoreOverrideCursor();
|
||||
while (QApplication::overrideCursor()) QApplication::restoreOverrideCursor();
|
||||
#ifdef __APPLE__
|
||||
CGAssociateMouseAndMouseCursorPosition(true);
|
||||
#endif
|
||||
@@ -247,7 +248,7 @@ RendererStack::enterEvent(QEnterEvent *event)
|
||||
RendererStack::enterEvent(QEvent *event)
|
||||
#endif
|
||||
{
|
||||
mousedata.mouse_tablet_in_proximity = 1;
|
||||
mousedata.mouse_tablet_in_proximity = m_monitor_index + 1;
|
||||
|
||||
if (mouse_input_mode == 1)
|
||||
QApplication::setOverrideCursor(Qt::CrossCursor);
|
||||
@@ -258,8 +259,10 @@ RendererStack::leaveEvent(QEvent *event)
|
||||
{
|
||||
mousedata.mouse_tablet_in_proximity = 0;
|
||||
|
||||
if (mouse_input_mode == 1 && QApplication::overrideCursor())
|
||||
QApplication::restoreOverrideCursor();
|
||||
if (mouse_input_mode == 1 && QApplication::overrideCursor()) {
|
||||
while (QApplication::overrideCursor())
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
if (QApplication::platformName().contains("wayland")) {
|
||||
event->accept();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user