Skip to content

Commit

Permalink
fixes 0003913: libspnav crash on linux wayland during startup
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 5, 2019
1 parent 847035c commit 870ad71
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp
Expand Up @@ -66,15 +66,21 @@ Gui::GuiNativeEvent::~GuiNativeEvent()

void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window)
{
#if QT_VERSION >= 0x050200
if (!QX11Info::isPlatformX11()) {
Base::Console().Log("Application is not running on X11\n");
return;
}
#endif
if (spnav_x11_open(QX11Info::display(), window->winId()) == -1) {
Base::Console().Log("Couldn't connect to spacenav daemon\n");
} else {
Base::Console().Log("Connected to spacenav daemon\n");
mainApp->setSpaceballPresent(true);
mainApp->setSpaceballPresent(true);

#if QT_VERSION >= 0x050000
#if QT_VERSION >= 0x050000
mainApp->installNativeEventFilter(new Gui::RawInputEventFilter(&xcbEventFilter));
#endif // #if QT_VERSION >= 0x050000
#endif // #if QT_VERSION >= 0x050000
}
}

Expand Down

0 comments on commit 870ad71

Please sign in to comment.