feat(Gui): set client name to FreeCAD when connecting to spacenav
This enables per-application configuration in spacenavd for FreeCAD.
This commit is contained in:
committed by
Chris Hennes
parent
3f84746a5c
commit
e38c831970
@@ -55,6 +55,7 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow* window)
|
||||
);
|
||||
}
|
||||
else {
|
||||
spnav_client_name("FreeCAD");
|
||||
Base::Console().log("Connected to spacenav daemon\n");
|
||||
QSocketNotifier* SpacenavNotifier
|
||||
= new QSocketNotifier(spnav_fd(), QSocketNotifier::Read, this);
|
||||
|
||||
@@ -75,6 +75,7 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow* window)
|
||||
.log("Couldn't connect to spacenav daemon on X11. Please ignore if you don't have a spacemouse.\n");
|
||||
}
|
||||
else {
|
||||
spnav_client_name("FreeCAD");
|
||||
Base::Console().log("Connected to spacenav daemon on X11\n");
|
||||
mainApp->setSpaceballPresent(true);
|
||||
mainApp->installNativeEventFilter(new Gui::RawInputEventFilter(&xcbEventFilter));
|
||||
|
||||
@@ -94,6 +94,9 @@ SpaceNavigatorDevice::SpaceNavigatorDevice(QuarterWidget* quarter) :
|
||||
if (!PRIVATE(this)->hasdevice) {
|
||||
fprintf(stderr, "Quarter:: Could not hook up to Spacenav device.\n");
|
||||
}
|
||||
else {
|
||||
spnav_client_name("FreeCAD");
|
||||
}
|
||||
|
||||
#endif // HAVE_SPACENAV_LIB
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user