summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-01 09:52:38 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-22 15:56:51 +1000
commitc9562bed0d5e26b7e3e55e26cf1ddc5086d61cc6 (patch)
tree872d1ef13376dc5c952ffda50716d84ae81225f9 /mi
parent09496996accfdaf7bc01097a25db400912004d97 (diff)
dix: rename mieqSwitchScreen argument fromDix → set_dequeue_screen, document
fromDIX is neither exactly true nor particularly helpful in understanding what this parameter triggers. Rename to set_dequeue_screen, because that's exactly what happens. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'mi')
-rw-r--r--mi/mi.h2
-rw-r--r--mi/mieq.c19
-rw-r--r--mi/mipointer.h2
3 files changed, 19 insertions, 4 deletions
diff --git a/mi/mi.h b/mi/mi.h
index c186940ff..24d1af911 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -206,7 +206,7 @@ extern _X_EXPORT void mieqEnqueue(
extern _X_EXPORT void mieqSwitchScreen(
DeviceIntPtr /* pDev */,
ScreenPtr /*pScreen*/,
- Bool /*fromDIX*/
+ Bool /*set_dequeue_screen*/
);
extern _X_EXPORT void mieqProcessDeviceEvent(
diff --git a/mi/mieq.c b/mi/mieq.c
index fc3738a41..b75bde9de 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -209,14 +209,29 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e)
#endif
}
+/**
+ * Changes the screen reference events are being enqueued from.
+ * Input events are enqueued with a screen reference and dequeued and
+ * processed with a (potentially different) screen reference.
+ * This function is called whenever a new event has changed screen but is
+ * still logically on the previous screen as seen by the client.
+ * This usually happens whenever the visible cursor moves across screen
+ * boundaries during event generation, before the same event is processed
+ * and sent down the wire.
+ *
+ * @param pDev The device that triggered a screen change.
+ * @param pScreen The new screen events are being enqueued for.
+ * @param set_dequeue_screen If TRUE, pScreen is set as both enqueue screen
+ * and dequeue screen.
+ */
void
-mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool fromDIX)
+mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen)
{
#ifdef XQUARTZ
pthread_mutex_lock(&miEventQueueMutex);
#endif
EnqueueScreen(pDev) = pScreen;
- if (fromDIX)
+ if (set_dequeue_screen)
DequeueScreen(pDev) = pScreen;
#ifdef XQUARTZ
pthread_mutex_unlock(&miEventQueueMutex);
diff --git a/mi/mipointer.h b/mi/mipointer.h
index 539096e78..c4265f9d8 100644
--- a/mi/mipointer.h
+++ b/mi/mipointer.h
@@ -87,7 +87,7 @@ typedef struct _miPointerScreenFuncRec {
void (*NewEventScreen)(
DeviceIntPtr /* pDev */,
ScreenPtr /* pScr */,
- Bool /* fromDIX */
+ Bool /* set_dequeue_screen */
);
} miPointerScreenFuncRec, *miPointerScreenFuncPtr;