Merge remote-tracking branch 'upstream/master' into newqt2

This commit is contained in:
Cacodemon345
2022-04-21 16:32:48 +06:00
66 changed files with 1553 additions and 19861 deletions

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();
}
});
@@ -520,10 +514,11 @@ void MainWindow::closeEvent(QCloseEvent *event) {
}
qt_nvr_save();
config_save();
#if defined __unix__ && !defined __HAIKU__
extern void xinput2_exit();
if (QApplication::platformName() == "xcb") xinput2_exit();
#endif
if (ui->stackedWidget->mouse_exit)
ui->stackedWidget->mouse_exit();
ui->stackedWidget->switchRenderer(RendererStack::Renderer::Software);
event->accept();
}