From f0fcffe55f280add5e4db2f5e9198a48c6f1b015 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 3 Jun 2010 19:00:54 -0700 Subject: [PATCH] Update the sprite immediately when moving it with MouseKeys 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 Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- xkb/xkbActions.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 96d3847b9..eea3d4adf 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -41,6 +41,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xkb.h" #include #include "mi.h" +#include "mipointer.h" #define EXTENSION_EVENT_BASE 64 DevPrivateKeyRec xkbDevicePrivateKeyRec; @@ -1337,6 +1338,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 (IsMaster(dev)) @@ -1353,9 +1356,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++)