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:
Neale Swinnerton
2026-01-26 20:20:12 +00:00
committed by Chris Hennes
parent 3f84746a5c
commit e38c831970
3 changed files with 5 additions and 0 deletions

View File

@@ -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);

View File

@@ -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));

View File

@@ -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
}