[Bf-blender-cvs] [165caafb99c] blender2.7: Revert fix for T48901: Use of XIWarpPointer

Campbell Barton noreply at git.blender.org
Tue Jan 15 06:52:51 CET 2019


Commit: 165caafb99c6846e53d11c4e966990aaffc06cea
Author: Campbell Barton
Date:   Tue Jan 15 16:44:08 2019 +1100
Branches: blender2.7
https://developer.blender.org/rB165caafb99c6846e53d11c4e966990aaffc06cea

Revert fix for T48901: Use of XIWarpPointer

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

===================================================================

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

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 1791908f670..194b0fc5df7 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -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))
 	{
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index b5d06eed412..a166ca86dea 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -42,6 +42,12 @@
 // 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)
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index ee8218b4827..7e5c77618dd 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -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))
 			{



More information about the Bf-blender-cvs mailing list