qt: Avoid crashes on X11 at exit
This commit is contained in:
@@ -445,6 +445,10 @@ void MainWindow::closeEvent(QCloseEvent *event) {
|
||||
}
|
||||
qt_nvr_save();
|
||||
config_save();
|
||||
#ifdef __unix__
|
||||
extern void xinput2_exit();
|
||||
if (QApplication::platformName() == "xcb") xinput2_exit();
|
||||
#endif
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
@@ -152,9 +152,12 @@ void xinput2_proc()
|
||||
|
||||
void xinput2_exit()
|
||||
{
|
||||
exitthread = true;
|
||||
procThread->wait(5000);
|
||||
procThread->terminate();
|
||||
if (!exitthread)
|
||||
{
|
||||
exitthread = true;
|
||||
procThread->wait(5000);
|
||||
procThread->terminate();
|
||||
}
|
||||
}
|
||||
|
||||
void xinput2_init()
|
||||
|
Reference in New Issue
Block a user