summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-06-03 19:00:53 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2010-07-02 14:27:49 +1000
commit3d9079b898c432a87f9b95c1f39a85f660bf0858 (patch)
treee40067ee9cbdf8115134e848a17ed62c4e686c33 /mi
parent69b2b5c85ec079ef49f84722daa5f148cedc2e1b (diff)
Add API to update setting of waitForUpdate screen private in miPointer
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>
Diffstat (limited to 'mi')
-rw-r--r--mi/mipointer.c16
-rw-r--r--mi/mipointer.h5
2 files changed, 21 insertions, 0 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c
index 33bb40b89..9936a01f4 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -452,6 +452,22 @@ miPointerGetScreen(DeviceIntPtr pDev)
return (pPointer) ? pPointer->pScreen : NULL;
}
+/* Controls whether the cursor image should be updated immediately when
+ moved (FALSE) or if something else will be responsible for updating
+ it later (TRUE). Returns current setting.
+ Caller is responsible for calling OsBlockSignal first.
+*/
+Bool
+miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait)
+{
+ SetupScreen(pScreen);
+ Bool prevWait = pScreenPriv->waitForUpdate;
+
+ pScreenPriv->waitForUpdate = wait;
+ return prevWait;
+}
+
+
/* Move the pointer on the current screen, and update the sprite. */
static void
miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen,
diff --git a/mi/mipointer.h b/mi/mipointer.h
index de58c07f4..3c8611022 100644
--- a/mi/mipointer.h
+++ b/mi/mipointer.h
@@ -139,6 +139,11 @@ extern _X_EXPORT void miPointerSetPosition(
extern _X_EXPORT void miPointerUpdateSprite(
DeviceIntPtr pDev);
+/* Sets whether the sprite should be updated immediately on pointer moves */
+extern _X_EXPORT Bool miPointerSetWaitForUpdate(
+ ScreenPtr pScreen,
+ Bool wait);
+
extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec;
#define miPointerPrivKey (&miPointerPrivKeyRec)