diff -r c6e0edef8997 code/CMakeModules/CheckDepends.cmake
diff -r c6e0edef8997 code/nel/src/3d/driver/opengl/unix_event_emitter.cpp
--- a/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp	Sat Jan 22 17:47:16 2011 +0100
+++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp	Sat Jan 29 09:36:57 2011 +0100
@@ -25,7 +25,6 @@
 #include <X11/Xutil.h>
 #include "nel/misc/debug.h"
 
-
 typedef bool (*x11Proc)(NL3D::IDriver *drv, XEvent *e);
 
 static Atom XA_CLIPBOARD = 0;
@@ -159,12 +158,20 @@
 
 void CUnixEventEmitter::emulateMouseRawMode(bool enable)
 {
-	_emulateRawMode = enable;
-
-	if(_emulateRawMode)
+	if(!_emulateRawMode and enable)
 	{
 		XWindowAttributes xwa;
 		XGetWindowAttributes(_dpy, _win, &xwa);
+		
+		Window root,child;
+		int root_x,root_y;
+		int win_x,win_y;
+		unsigned int mask;
+		bool inwindow;
+		inwindow = XQueryPointer(_dpy, _win, &root, &child, &root_x, &root_y, &win_x, &win_y, &mask);
+		_preRawX=win_x;
+		_preRawY=win_y;
+
 		XWarpPointer(_dpy, None, _win, None, None, None, None,
 			(xwa.width / 2), (xwa.height / 2));
 
@@ -174,6 +181,17 @@
 		XEvent event;
 		while(XCheckIfEvent(_dpy, &event, &isMouseMoveEvent, NULL)) { };
 	}
+	if(_emulateRawMode and !enable)
+	{
+		XWarpPointer(_dpy, None, _win, None, None, None, None,
+			_preRawX, _preRawY);
+		// remove all outstanding mouse move events, they happened before the mouse
+		// was pulled back to 0.5 / 0.5, so a wrong movement delta would be
+		// reported otherwise
+		XEvent event;
+		while(XCheckIfEvent(_dpy, &event, &isMouseMoveEvent, NULL)) { };
+	}
+	_emulateRawMode = enable;
 }
 
 #ifndef AltMask
diff -r c6e0edef8997 code/nel/src/3d/driver/opengl/unix_event_emitter.h
--- a/code/nel/src/3d/driver/opengl/unix_event_emitter.h	Sat Jan 22 17:47:16 2011 +0100
+++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.h	Sat Jan 29 09:36:57 2011 +0100
@@ -106,11 +106,13 @@
 	std::map<TKey, bool>	_PressedKeys;
 	XIM						_im;
 	XIC						_ic;
-	bool					_emulateRawMode;
 	NL3D::IDriver*			_driver;
 	CUnixEventServer		_InternalServer;
 	ucstring				_CopiedString;
 	bool					_SelectionOwned;
+	bool					_emulateRawMode;
+	int					_preRawX;
+	int					_preRawY;
 };
 
 
diff -r c6e0edef8997 code/ryzom/client/src/events_listener.cpp
--- a/code/ryzom/client/src/events_listener.cpp	Sat Jan 22 17:47:16 2011 +0100
+++ b/code/ryzom/client/src/events_listener.cpp	Sat Jan 29 09:36:57 2011 +0100
@@ -30,7 +30,6 @@
 #include "input.h"
 #include "interface_v3/interface_manager.h"
 
-
 using namespace NLMISC;
 
 extern CActionsManager Actions;	// Actions Manager.
@@ -263,8 +262,8 @@
 
 	if (ClientCfg.FreeLookSmoothingPeriod == 0 || !_MouseSmoothingOn)
 	{
-		_MouseDeltaAX = x * ClientCfg.FreeLookSpeed;
-		_MouseDeltaAY = y * ClientCfg.FreeLookSpeed;
+		_MouseDeltaAX += x * ClientCfg.FreeLookSpeed;
+		_MouseDeltaAY += y * ClientCfg.FreeLookSpeed;
 		_FreeLookSmoothed = false;
 	}
 	else
@@ -307,20 +306,12 @@
 	{
 		_MouseAngleX = true;
 	}
-	else
-	{
-		_MouseAngleX = false;
-	}
 
 	// If mouse pos Y changed.
 	if (fabs(_MouseDeltaAY) > epsilon)
 	{
 		_MouseAngleY = true;
 	}
-	else
-	{
-		_MouseAngleY = false;
-	}
 }
 
 // ***************************************************************
@@ -337,14 +328,10 @@
 	// If Mouse pos X changed.
 	if(_MouseX != _OldMouseX)
 		_MouseMoveX = true;
-	else
-		_MouseMoveX = false;
 
 	// If Mouse pos Y changed.
 	if(_MouseY != _OldMouseY)
 		_MouseMoveY = true;
-	else
-		_MouseMoveY = false;
 }
 
 //---------------------------------------------------
@@ -426,7 +413,9 @@
 //---------------------------------------------------
 float CEventsListener::getMouseAngleX()
 {
-	return _MouseDeltaAX;
+	float MouseDelta=_MouseDeltaAX;
+	_MouseDeltaAX=0.f;
+	return MouseDelta;
 }// getMouseAngleX //
 
 //---------------------------------------------------
@@ -434,7 +423,9 @@
 //---------------------------------------------------
 float CEventsListener::getMouseAngleY()
 {
-	return _MouseDeltaAY;
+	float MouseDelta=_MouseDeltaAY;
+	_MouseDeltaAY=0.f;
+	return MouseDelta;
 }// getMouseAngleY //
 
 // ***************************************************************************
