Selectable mouse type on Linux, part 3
This commit is contained in:
@@ -207,18 +207,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
qt_mouse_capture(mouse_capture);
|
qt_mouse_capture(mouse_capture);
|
||||||
if (mouse_capture) {
|
if (mouse_capture) {
|
||||||
this->grabKeyboard();
|
this->grabKeyboard();
|
||||||
#ifdef WAYLAND
|
if (ui->stackedWidget->mouse_capture)
|
||||||
if (QGuiApplication::platformName().contains("wayland")) {
|
ui->stackedWidget->mouse_capture(this->windowHandle());
|
||||||
wl_mouse_capture(this->windowHandle());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
this->releaseKeyboard();
|
this->releaseKeyboard();
|
||||||
#ifdef WAYLAND
|
if (ui->stackedWidget->mouse_uncapture)
|
||||||
if (QGuiApplication::platformName().contains("wayland")) {
|
ui->stackedWidget->mouse_uncapture();
|
||||||
wl_mouse_uncapture();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user