diff options
author | Sv. Lockal <lockalsash@gmail.com> | 2013-01-23 19:01:33 +0400 |
---|---|---|
committer | Sv. Lockal <lockalsash@gmail.com> | 2013-01-23 19:01:33 +0400 |
commit | 36641078f875c1bf12b37a39112a03a3adfc79fe (patch) | |
tree | 46fc78655ec229425ac29c48db0c3f317cd328b4 /intern/ghost | |
parent | 6558a22b91920e8d7b74d9b3b796a0cb263236ef (diff) |
Fix compilation with WITH_X11_XINPUT=OFF
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 3d1b61305b1..ce3d9cc46f8 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -1211,11 +1211,13 @@ installDrawingContext( switch (type) { case GHOST_kDrawingContextTypeOpenGL: { +#ifdef WITH_X11_XINPUT /* use our own event handlers to avoid exiting blender, * this would happen for eg: * if you open blender, unplug a tablet, then open a new window. */ XErrorHandler old_handler = XSetErrorHandler(GHOST_X11_ApplicationErrorHandler); XIOErrorHandler old_handler_io = XSetIOErrorHandler(GHOST_X11_ApplicationIOErrorHandler); +#endif m_context = glXCreateContext(m_display, m_visual, s_firstContext, True); if (m_context != NULL) { @@ -1231,10 +1233,11 @@ installDrawingContext( success = GHOST_kFailure; } +#ifdef WITH_X11_XINPUT /* Restore handler */ (void) XSetErrorHandler(old_handler); (void) XSetIOErrorHandler(old_handler_io); - +#endif break; } case GHOST_kDrawingContextTypeNone: |