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 <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Alan Coopersmith 2010-06-03 19:00:54 -07:00 committed by Peter Hutterer
parent 3d9079b898
commit f0fcffe55f

View File

@ -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
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++)