Selectable mouse type on Linux, part 3

This commit is contained in:
richardg867
2022-04-20 20:55:26 -03:00
committed by GitHub
parent 5f070c8f74
commit 5810f39f4d

View File

@@ -207,18 +207,12 @@ MainWindow::MainWindow(QWidget *parent) :
qt_mouse_capture(mouse_capture);
if (mouse_capture) {
this->grabKeyboard();
#ifdef WAYLAND
if (QGuiApplication::platformName().contains("wayland")) {
wl_mouse_capture(this->windowHandle());
}
#endif
if (ui->stackedWidget->mouse_capture)
ui->stackedWidget->mouse_capture(this->windowHandle());
} else {
this->releaseKeyboard();
#ifdef WAYLAND
if (QGuiApplication::platformName().contains("wayland")) {
wl_mouse_uncapture();
}
#endif
if (ui->stackedWidget->mouse_uncapture)
ui->stackedWidget->mouse_uncapture();
}
});