Revert fix for T48901: Use of XIWarpPointer
authorCampbell Barton <ideasman42@gmail.com>
Tue, 15 Jan 2019 05:44:08 +0000 (16:44 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 15 Jan 2019 05:49:44 +0000 (16:49 +1100)
Xorg's XIWarpPointer doesn't support multi-head display while
XWarpPointer does.

Revert since this is a known TODO in Xorg and setting a custom
xinput matrix seems not to be used often.

Resolves T50383

intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_WindowX11.cpp

index 1791908f67079d1598e15fe18bd5bed7549d9a22..194b0fc5df7c91a7b3d6a332205f9e3d759fd673 100644 (file)
@@ -1573,7 +1573,7 @@ setCursorPosition(
        }
 #endif
 
-#ifdef WITH_X11_XINPUT
+#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP)
        if ((m_xinput_version.present) &&
            (m_xinput_version.major_version >= 2))
        {
index b5d06eed41219b21100303e1505205b450ccd1bc..a166ca86dead2301b8e93f920134297adc9a409d 100644 (file)
 // For tablets
 #ifdef WITH_X11_XINPUT
 #  include <X11/extensions/XInput.h>
+
+/* Disable xinput warp, currently not implemented by Xorg for multi-head display.
+ * (see comment in xserver "Xi/xiwarppointer.c" -> "FIXME: panoramix stuff is missing" ~ v1.13.4)
+ * If this is supported we can add back xinput for warping (fixing T48901).
+ * For now disable (see T50383). */
+// #  define USE_X11_XINPUT_WARP
 #endif
 
 #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
index ee8218b4827f354b6721cb439858904ba6c583e1..7e5c77618dd09612a9e08d8581fdcfd4bb1fff31 100644 (file)
@@ -1529,7 +1529,7 @@ setWindowCursorGrab(
                         * blender gets can be outside the screen causing menus not to show
                         * properly unless the user moves the mouse */
 
-#ifdef WITH_X11_XINPUT
+#if defined(WITH_X11_XINPUT) && defined(USE_X11_XINPUT_WARP)
                        if ((m_system->m_xinput_version.present) &&
                            (m_system->m_xinput_version.major_version >= 2))
                        {