From 9419259ff6fb11f5bd86a1b4ad26671ab26ba4f8 Mon Sep 17 00:00:00 2001 From: "Michael G. Hansen" Date: Mon, 18 Aug 2014 22:26:05 +0200 Subject: [PATCH] 1659: 3dconnexion space navigator moves view even when FreeCAD is not the active application Check whether the freecad window is active before relaying the space navigator events. --- src/Gui/GuiApplicationNativeEventAware.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Gui/GuiApplicationNativeEventAware.cpp b/src/Gui/GuiApplicationNativeEventAware.cpp index 1e97f0abd..2ae0d3dd0 100644 --- a/src/Gui/GuiApplicationNativeEventAware.cpp +++ b/src/Gui/GuiApplicationNativeEventAware.cpp @@ -100,6 +100,9 @@ void Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow *window) bool Gui::GUIApplicationNativeEventAware::processSpaceballEvent(QObject *object, QEvent *event) { + if (!activeWindow()) + return true; + QApplication::notify(object, event); if (event->type() == Spaceball::MotionEvent::MotionEventType) {