Cursor override fixes and preparation for overscan checking
This commit is contained in:
@@ -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