Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSv. Lockal <lockalsash@gmail.com>2013-01-23 19:01:33 +0400
committerSv. Lockal <lockalsash@gmail.com>2013-01-23 19:01:33 +0400
commit36641078f875c1bf12b37a39112a03a3adfc79fe (patch)
tree46fc78655ec229425ac29c48db0c3f317cd328b4
parent6558a22b91920e8d7b74d9b3b796a0cb263236ef (diff)
Fix compilation with WITH_X11_XINPUT=OFF
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp5
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: