summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-09-26 20:24:15 -0700
committerKeith Packard <keithp@keithp.com>2011-09-26 20:24:15 -0700
commitafb1fe695d197187a301c19863a128a65389b15c (patch)
treed1ec3b11b8ca521cb77ff1d6821786d3dfc6a5e1 /mi
parent7fb4bef0394a5d09680985d34bce8252b61493cb (diff)
parentc7163fdd302f706a3d67f0fdf93eeb3396bb3332 (diff)
Merge remote-tracking branch 'whot/next'
Diffstat (limited to 'mi')
-rw-r--r--mi/mi.h2
-rw-r--r--mi/mieq.c19
-rw-r--r--mi/mipointer.c10
-rw-r--r--mi/mipointer.h2
-rw-r--r--mi/misprite.c5
-rw-r--r--mi/mivaltree.c2
6 files changed, 24 insertions, 16 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.c b/mi/mipointer.c
index 7680ca19b..670f63b6e 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -569,9 +569,9 @@ miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen,
*
* @param pDev The device to move
* @param mode Movement mode (Absolute or Relative)
- * @param[in,out] x The x coordiante in screen coordinates (in regards to total
+ * @param[in,out] x The x coordinate in screen coordinates (in regards to total
* desktop size)
- * @param[in,out] y The y coordiante in screen coordinates (in regards to total
+ * @param[in,out] y The y coordinate in screen coordinates (in regards to total
* desktop size)
*/
void
@@ -603,7 +603,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
pScreen = newScreen;
(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen,
FALSE);
- /* Smash the confine to the new screen */
+ /* Smash the confine to the new screen */
pPointer->limits.x2 = pScreen->width;
pPointer->limits.y2 = pScreen->height;
}
@@ -622,8 +622,8 @@ miPointerSetPosition(DeviceIntPtr pDev, int mode, int *x, int *y)
if (pScreen->ConstrainCursorHarder)
pScreen->ConstrainCursorHarder(pDev, pScreen, mode, x, y);
- if (pPointer->x == *x && pPointer->y == *y &&
- pPointer->pScreen == pScreen)
+ if (pPointer->x == *x && pPointer->y == *y &&
+ pPointer->pScreen == pScreen)
return;
miPointerMoveNoEvent(pDev, pScreen, *x, *y);
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;
diff --git a/mi/misprite.c b/mi/misprite.c
index 1cfcdf6ee..1025c5a6f 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -937,8 +937,6 @@ static void
miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen)
{
miSpriteScreenPtr pScreenPriv;
- int x, y;
- CursorPtr pCursor;
miCursorInfoPtr pCursorInfo;
if (IsFloating(pDev))
@@ -949,10 +947,7 @@ miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen)
pCursorInfo = MISPRITE(pDev);
miSpriteComputeSaved (pDev, pScreen);
- pCursor = pCursorInfo->pCursor;
- x = pCursorInfo->x - (int)pCursor->bits->xhot;
- y = pCursorInfo->y - (int)pCursor->bits->yhot;
miSpriteDisableDamage(pScreen, pScreenPriv);
miDCSaveUnderCursor(pDev,
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index 0e00c2fb5..e1d47c06f 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -223,7 +223,6 @@ miComputeClips (
RegionRec childUnion;
Bool overlap;
RegionPtr borderVisible;
- Bool resized;
/*
* Figure out the new visibility of this window.
* The extent of the universe should be the same as the extent of
@@ -378,7 +377,6 @@ miComputeClips (
}
borderVisible = pParent->valdata->before.borderVisible;
- resized = pParent->valdata->before.resized;
RegionNull(&pParent->valdata->after.borderExposed);
RegionNull(&pParent->valdata->after.exposed);