GTK: use 3DConnexion button 0 instead of SI_APP_FIT_BUTTON.

The libspnav library doesn't even define SI_APP_FIT_BUTTON, which
appears to be Windows-specific functionality, perhaps a physical
button remapped with some logic. Just use 0 instead, since that
seems always safe.
This commit is contained in:
whitequark 2016-10-11 13:56:41 +00:00
parent b10e621fce
commit aa958504af

View File

@ -54,10 +54,7 @@
#include "config.h" #include "config.h"
#ifdef HAVE_SPACEWARE #ifdef HAVE_SPACEWARE
# include <spnav.h> #include <spnav.h>
# ifndef SI_APP_FIT_BUTTON
# define SI_APP_FIT_BUTTON 31
# endif
#endif #endif
namespace SolveSpace { namespace SolveSpace {
@ -1576,7 +1573,7 @@ static GdkFilterReturn GdkSpnavFilter(GdkXEvent *gxevent, GdkEvent *, gpointer)
break; break;
case SPNAV_EVENT_BUTTON: case SPNAV_EVENT_BUTTON:
if(!sev.button.press && sev.button.bnum == SI_APP_FIT_BUTTON) { if(!sev.button.press && sev.button.bnum == 0) {
SS.GW.SpaceNavigatorButtonUp(); SS.GW.SpaceNavigatorButtonUp();
} }
break; break;