From d635a2b1438aaff8b2aed47e9005107c0ccc09cd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 28 May 2011 15:34:02 +0000 Subject: Disabling xinput wasn't done completely. --- intern/ghost/intern/GHOST_SystemX11.cpp | 3 ++- intern/ghost/intern/GHOST_WindowX11.cpp | 5 ++++- intern/ghost/intern/GHOST_WindowX11.h | 14 ++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index b44f2b18225..c53bf7de36c 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -795,6 +795,7 @@ GHOST_SystemX11::processEvent(XEvent *xe) } default: { +#ifdef WITH_X11_XINPUT if(xe->type == window->GetXTablet().MotionEvent) { XDeviceMotionEvent* data = (XDeviceMotionEvent*)xe; @@ -818,7 +819,7 @@ GHOST_SystemX11::processEvent(XEvent *xe) } else if(xe->type == window->GetXTablet().ProxOutEvent) window->GetXTablet().CommonData.Active= GHOST_kTabletModeNone; - +#endif // WITH_X11_XINPUT break; } } diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index aea5b5156d9..fc72ea09f40 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -182,9 +182,12 @@ GHOST_WindowX11( Atom atoms[2]; int natom; int glxVersionMajor, glxVersionMinor; // As in GLX major.minor - + +#ifdef WITH_X11_XINPUT /* initialize incase X11 fails to load */ memset(&m_xtablet, 0, sizeof(m_xtablet)); +#endif + m_visual= NULL; if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) { diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h index 96d8ad77d10..2cb269ea919 100644 --- a/intern/ghost/intern/GHOST_WindowX11.h +++ b/intern/ghost/intern/GHOST_WindowX11.h @@ -38,7 +38,9 @@ #include #include // For tablets -#include +#ifdef WITH_X11_XINPUT +# include +#endif #include @@ -190,7 +192,7 @@ public: Window getXWindow( ); - +#ifdef WITH_X11_XINPUT class XTablet { public: @@ -214,6 +216,10 @@ public: const GHOST_TabletData* GetTabletData() { return &m_xtablet.CommonData; } +#else // WITH_X11_XINPUT + const GHOST_TabletData* GetTabletData() + { return NULL; } +#endif // WITH_X11_XINPUT /* * Need this in case that we want start the window @@ -321,7 +327,9 @@ private : getEmptyCursor( ); +#ifdef WITH_X11_XINPUT void initXInputDevices(); +#endif GLXContext m_context; Window m_window; @@ -350,8 +358,10 @@ private : /** Cache of XC_* ID's to XCursor structures */ std::map m_standard_cursors; +#ifdef WITH_X11_XINPUT /* Tablet devices */ XTablet m_xtablet; +#endif void icccmSetState(int state); int icccmGetState() const; -- cgit v1.2.3