diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-28 19:34:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-28 19:34:02 +0400 |
commit | d635a2b1438aaff8b2aed47e9005107c0ccc09cd (patch) | |
tree | f12dc0c878fe04e5d9bcdd3827f137e810bc9310 /intern | |
parent | 5ca36915a6fe5f2aa2f544aa99216ee0dc48014f (diff) |
Disabling xinput wasn't done completely.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 3 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 5 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.h | 14 |
3 files changed, 18 insertions, 4 deletions
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 <X11/Xlib.h> #include <GL/glx.h> // For tablets -#include <X11/extensions/XInput.h> +#ifdef WITH_X11_XINPUT +# include <X11/extensions/XInput.h> +#endif #include <map> @@ -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<unsigned int, Cursor> m_standard_cursors; +#ifdef WITH_X11_XINPUT /* Tablet devices */ XTablet m_xtablet; +#endif void icccmSetState(int state); int icccmGetState() const; |