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