[Bf-blender-cvs] [aeec348] experimental-build: Revert "Attempt to fix T48204..."

Bastien Montagne noreply at git.blender.org
Fri May 6 18:17:00 CEST 2016


Commit: aeec3482eb2ec2e84491688804aaab1c59f36277
Author: Bastien Montagne
Date:   Fri May 6 18:16:08 2016 +0200
Branches: experimental-build
https://developer.blender.org/rBaeec3482eb2ec2e84491688804aaab1c59f36277

Revert "Attempt to fix T48204..."

This reverts commit c444bc670e428f1315c5804efef94f76bb12d6d0.

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

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

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

diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index dc11d16..29508a8 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -91,7 +91,6 @@ typedef enum {
 
 typedef struct GHOST_TabletData {
 	GHOST_TTabletMode Active; /* 0=None, 1=Stylus, 2=Eraser */
-	int x_root, y_root;  /* Coordinates in root window. */
 	float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */
 	float Xtilt;    /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */
 	float Ytilt;    /* as above */
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 8aa2cb4..0c87ee1 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -705,16 +705,12 @@ GHOST_SystemX11::processEvent(XEvent *xe)
 			XMotionEvent &xme = xe->xmotion;
 
 #ifdef WITH_X11_XINPUT
-			const bool is_tablet = window->GetTabletData()->Active != GHOST_kTabletModeNone;
+			bool is_tablet = window->GetTabletData()->Active != GHOST_kTabletModeNone;
 #else
-			const bool is_tablet = false;
+			bool is_tablet = false;
 #endif
 
-			if (is_tablet == true) {
-				/* Do Nothing (c)
-				 * See T48204 and comment in tablet handling code (default case below). */
-			}
-			if (window->getCursorGrabModeIsWarp()) {
+			if (is_tablet == false && window->getCursorGrabModeIsWarp()) {
 				GHOST_TInt32 x_new = xme.x_root;
 				GHOST_TInt32 y_new = xme.y_root;
 				GHOST_TInt32 x_accum, y_accum;
@@ -1245,31 +1241,6 @@ GHOST_SystemX11::processEvent(XEvent *xe)
 
 #define AXIS_VALUE_GET(axis, val)  ((axis_first <= axis && axes_end > axis) && ((void)(val = data->axis_data[axis]), true))
 
-				if (axis_first < 2) {
-					/* There are some movement.
-					 * Note: maybe we could use X/Y valuator values themselves, but it's not that interesting
-					 * for us here, and converting them to root coordinates is not trivial.
-					 * However, we suffer again here from some drivers (generic evdev...) which only output a subset
-					 * of whole data - specifically, it may give Y value without X value (the reverse is not possible),
-					 * and looks like even x_root of main motion event gets corrupted in this case!
-					 * So we do as with pressure etc. - cache locations 'root' data. */
-					if (AXIS_VALUE_GET(0, axis_value)) {
-						window->GetTabletData()->x_root = data->x_root;
-					}
-					if (AXIS_VALUE_GET(1, axis_value)) {
-						window->GetTabletData()->y_root = data->y_root;
-					}
-
-					g_event = new
-					          GHOST_EventCursor(
-					    getMilliSeconds(),
-					    GHOST_kEventCursorMove,
-					    window,
-					    window->GetTabletData()->x_root,
-					    window->GetTabletData()->y_root
-					    );
-				}
-
 				if (AXIS_VALUE_GET(2, axis_value)) {
 					window->GetTabletData()->Pressure = axis_value / ((float)m_xtablet.PressureLevels);
 				}




More information about the Bf-blender-cvs mailing list