[PATCH] mi: fix cursor warping screens

Tiago Vignatti tiago.vignatti at nokia.com
Sun Aug 2 11:47:40 PDT 2009


The server was processing ET_RawMotion type when the cursor was wrapping to
another screen and getting wrong valuator values. This fix such issue
considering only ET_Motion types when the cursor detects a new screen.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
Dave: I'd appreciate your review as well given that, besides me, you're 
probably the only one playing with multiscreen on upstream :)

 mi/mieq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index 6ec2dba..3ee7e2e 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -367,7 +367,8 @@ mieqProcessDeviceEvent(DeviceIntPtr dev,
     /* Custom event handler */
     handler = miEventQueue.handlers[event->any.type];
 
-    if (dev && screen && screen != DequeueScreen(dev) && !handler) {
+    if (event->any.type == ET_Motion && dev && screen &&
+        screen != DequeueScreen(dev) && !handler) {
         /* Assumption - screen switching can only occur on motion events. */
         DequeueScreen(dev) = screen;
         x = event->device.root_x;
-- 
1.5.6.3



More information about the xorg-devel mailing list