From e2cd67e99bf100aec43bde52baee846837e14294 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 1e97f0abd3..2ae0d3dd0f 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) {