GTK: only attempt to use libspnav on X11.

This makes SolveSpace run on Wayland.
pull/106/head
whitequark 2017-01-06 22:28:44 +00:00
parent 00dda08917
commit da7c74af2e
1 changed files with 6 additions and 4 deletions

View File

@ -1429,10 +1429,12 @@ int main(int argc, char** argv) {
if(SetLocale(*langNames++)) break;
}
#ifdef HAVE_SPACEWARE
// We don't care if it can't be opened; just continue without.
spnav_x11_open(gdk_x11_get_default_xdisplay(),
gdk_x11_window_get_xid(GW->get_window()->gobj()));
#if defined(HAVE_SPACEWARE) && defined(GDK_WINDOWING_X11)
if(GDK_IS_X11_DISPLAY(Gdk::Display::get_default()->gobj())) {
// We don't care if it can't be opened; just continue without.
spnav_x11_open(gdk_x11_get_default_xdisplay(),
gdk_x11_window_get_xid(GW->get_window()->gobj()));
}
#endif
SS.Init();