[PATCH 2/2] Update the sprite immediately when moving it with MouseKeys

Alan Coopersmith alan.coopersmith at oracle.com
Thu Jun 3 19:00:54 PDT 2010


Fix for OpenSolaris bug 6949755: Mouse Keys are ununusable
and possibly https://bugs.freedesktop.org/show_bug.cgi?id=24856

Ensures waitForUpdate is False before calling SetCursorPosition.
Normally waitForUpdate is False when SilkenMouse is active, True
when it's not.   When it's True, the mouse cursor position on
screen is not updated immediately.

This is more critical on Solaris, since we disabled SigIO, thus in turn
disable SilkenMouse, due to the SSE2 vs. signal handler issues described in
Sun bugs 6849925, 6859428, and 6879897.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 xkb/xkbActions.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 0a1a873..dd274bf 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -41,6 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include "xkb.h"
 #include <ctype.h>
 #include "mi.h"
+#include "mipointer.h"
 #define EXTENSION_EVENT_BASE 64
 
 static int xkbDevicePrivateKeyIndex;
@@ -1326,6 +1327,8 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
     EventListPtr        events;
     int                 nevents, i;
     DeviceIntPtr        ptr;
+    ScreenPtr           pScreen;
+    Bool                saveWait;
     int                 gpe_flags = 0;
 
     if (!dev->u.master)
@@ -1340,9 +1343,12 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y)
 
     events = InitEventList(GetMaximumEventsNum());
     OsBlockSignals();
+    pScreen = miPointerGetScreen(ptr);
+    saveWait = miPointerSetWaitForUpdate(pScreen, FALSE);
     nevents = GetPointerEvents(events, ptr,
                                MotionNotify, 0,
                                gpe_flags, 0, 2, (int[]){x, y});
+    miPointerSetWaitForUpdate(pScreen, saveWait);
     OsReleaseSignals();
 
     for (i = 0; i < nevents; i++)
-- 
1.5.6.5



More information about the xorg-devel mailing list