summaryrefslogtreecommitdiff
path: root/dix/events.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/events.c')
-rw-r--r--dix/events.c202
1 files changed, 101 insertions, 101 deletions
diff --git a/dix/events.c b/dix/events.c
index 50c7d46e4..227d62934 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -83,8 +83,8 @@ SOFTWARE.
#include "dixstruct.h"
#ifdef XINERAMA
-#include "xinerama.h"
-#include "xineramaSrv.h"
+#include "panoramiX.h"
+#include "panoramiXsrv.h"
#endif
#include "globals.h"
@@ -282,8 +282,8 @@ XineramaSetCursorPosition(
that screen are. */
pScreen = sprite.screen;
- x += xineramaDataPtr[0].x;
- y += xineramaDataPtr[0].y;
+ x += panoramiXdataPtr[0].x;
+ y += panoramiXdataPtr[0].y;
if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
x, y, &box))
@@ -301,10 +301,10 @@ XineramaSetCursorPosition(
}
sprite.screen = pScreen;
- sprite.hotPhys.x = x - xineramaDataPtr[0].x;
- sprite.hotPhys.y = y - xineramaDataPtr[0].y;
- x -= xineramaDataPtr[pScreen->myNum].x;
- y -= xineramaDataPtr[pScreen->myNum].y;
+ sprite.hotPhys.x = x - panoramiXdataPtr[0].x;
+ sprite.hotPhys.y = y - panoramiXdataPtr[0].y;
+ x -= panoramiXdataPtr[pScreen->myNum].x;
+ y -= panoramiXdataPtr[pScreen->myNum].y;
return (*pScreen->SetCursorPosition)(pScreen, x, y, generateEvent);
}
@@ -318,10 +318,10 @@ XineramaConstrainCursor(void)
/* Translate the constraining box to the screen
the sprite is actually on */
- newBox.x1 += xineramaDataPtr[0].x - xineramaDataPtr[pScreen->myNum].x;
- newBox.x2 += xineramaDataPtr[0].x - xineramaDataPtr[pScreen->myNum].x;
- newBox.y1 += xineramaDataPtr[0].y - xineramaDataPtr[pScreen->myNum].y;
- newBox.y2 += xineramaDataPtr[0].y - xineramaDataPtr[pScreen->myNum].y;
+ newBox.x1 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
+ newBox.x2 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x;
+ newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
+ newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y;
(* pScreen->ConstrainCursor)(pScreen, &newBox);
}
@@ -378,17 +378,17 @@ XineramaSetWindowPntrs(WindowPtr pWin)
{
if(pWin == WindowTable[0]) {
memcpy(sprite.windows, WindowTable,
- XineramaNumScreens*sizeof(WindowPtr));
+ PanoramiXNumScreens*sizeof(WindowPtr));
} else {
- XineramaRes *win;
+ PanoramiXRes *win;
int i;
- win = (XineramaRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW);
+ win = (PanoramiXRes*)LookupIDByType(pWin->drawable.id, XRT_WINDOW);
if(!win)
return FALSE;
- for(i = 0; i < XineramaNumScreens; i++) {
+ for(i = 0; i < PanoramiXNumScreens; i++) {
sprite.windows[i] = LookupIDByType(win->info[i].id, RT_WINDOW);
if(!sprite.windows[i]) /* window is being unmapped */
return FALSE;
@@ -419,16 +419,16 @@ XineramaCheckVirtualMotion(
if(!XineramaSetWindowPntrs(pWin))
return;
- i = XineramaNumScreens - 1;
+ i = PanoramiXNumScreens - 1;
REGION_COPY(sprite.screen, &sprite.Reg2,
&sprite.windows[i]->borderSize);
- off_x = xineramaDataPtr[i].x;
- off_y = xineramaDataPtr[i].y;
+ off_x = panoramiXdataPtr[i].x;
+ off_y = panoramiXdataPtr[i].y;
while(i--) {
- x = off_x - xineramaDataPtr[i].x;
- y = off_y - xineramaDataPtr[i].y;
+ x = off_x - panoramiXdataPtr[i].x;
+ y = off_y - panoramiXdataPtr[i].y;
if(x || y)
REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
@@ -436,8 +436,8 @@ XineramaCheckVirtualMotion(
REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
&sprite.windows[i]->borderSize);
- off_x = xineramaDataPtr[i].x;
- off_y = xineramaDataPtr[i].y;
+ off_x = panoramiXdataPtr[i].x;
+ off_y = panoramiXdataPtr[i].y;
}
lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
@@ -474,10 +474,10 @@ XineramaCheckMotion(xEvent *xE)
/* Motion events entering DIX get translated to Screen 0
coordinates. Replayed events have already been
translated since they've entered DIX before */
- XE_KBPTR.rootX += xineramaDataPtr[sprite.screen->myNum].x -
- xineramaDataPtr[0].x;
- XE_KBPTR.rootY += xineramaDataPtr[sprite.screen->myNum].y -
- xineramaDataPtr[0].y;
+ XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x -
+ panoramiXdataPtr[0].x;
+ XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
+ panoramiXdataPtr[0].y;
sprite.hot.x = XE_KBPTR.rootX;
sprite.hot.y = XE_KBPTR.rootY;
@@ -536,16 +536,16 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
if(!XineramaSetWindowPntrs(pWin))
return;
- i = XineramaNumScreens - 1;
+ i = PanoramiXNumScreens - 1;
REGION_COPY(sprite.screen, &sprite.Reg1,
&sprite.windows[i]->borderSize);
- off_x = xineramaDataPtr[i].x;
- off_y = xineramaDataPtr[i].y;
+ off_x = panoramiXdataPtr[i].x;
+ off_y = panoramiXdataPtr[i].y;
while(i--) {
- x = off_x - xineramaDataPtr[i].x;
- y = off_y - xineramaDataPtr[i].y;
+ x = off_x - panoramiXdataPtr[i].x;
+ y = off_y - panoramiXdataPtr[i].y;
if(x || y)
REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
@@ -553,8 +553,8 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
&sprite.windows[i]->borderSize);
- off_x = xineramaDataPtr[i].x;
- off_y = xineramaDataPtr[i].y;
+ off_x = panoramiXdataPtr[i].x;
+ off_y = panoramiXdataPtr[i].y;
}
sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
@@ -616,9 +616,9 @@ SyntheticMotion(int x, int y)
/* Translate back to the sprite screen since processInputProc
will translate from sprite screen to screen 0 upon reentry
to the DIX layer */
- if(!noXineramaExtension) {
- x += xineramaDataPtr[0].x - xineramaDataPtr[sprite.screen->myNum].x;
- y += xineramaDataPtr[0].y - xineramaDataPtr[sprite.screen->myNum].y;
+ if(!noPanoramiXExtension) {
+ x += panoramiXdataPtr[0].x - panoramiXdataPtr[sprite.screen->myNum].x;
+ y += panoramiXdataPtr[0].y - panoramiXdataPtr[sprite.screen->myNum].y;
}
#endif
xE.u.keyButtonPointer.rootX = x;
@@ -721,7 +721,7 @@ CheckVirtualMotion(
{
#ifdef XINERAMA
- if(!noXineramaExtension) {
+ if(!noPanoramiXExtension) {
XineramaCheckVirtualMotion(qe, pWin);
return;
}
@@ -772,7 +772,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
ScreenPtr pScreen = pWin->drawable.pScreen;
#ifdef XINERAMA
- if(!noXineramaExtension) {
+ if(!noPanoramiXExtension) {
XineramaConfineCursorToWindow(pWin, generateEvents);
return;
}
@@ -805,7 +805,7 @@ static void
ChangeToCursor(CursorPtr cursor)
{
#ifdef XINERAMA
- if(!noXineramaExtension) {
+ if(!noPanoramiXExtension) {
XineramaChangeToCursor(cursor);
return;
}
@@ -893,7 +893,7 @@ GetSpritePosition(px, py)
int
XineramaGetCursorScreen()
{
- if(!noXineramaExtension) {
+ if(!noPanoramiXExtension) {
return sprite.screen->myNum;
} else {
return 0;
@@ -975,11 +975,11 @@ EnqueueEvent(xE, device, count)
if (xE->u.u.type == MotionNotify)
{
#ifdef XINERAMA
- if(!noXineramaExtension) {
- XE_KBPTR.rootX += xineramaDataPtr[sprite.screen->myNum].x -
- xineramaDataPtr[0].x;
- XE_KBPTR.rootY += xineramaDataPtr[sprite.screen->myNum].y -
- xineramaDataPtr[0].y;
+ if(!noPanoramiXExtension) {
+ XE_KBPTR.rootX += panoramiXdataPtr[sprite.screen->myNum].x -
+ panoramiXdataPtr[0].x;
+ XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y -
+ panoramiXdataPtr[0].y;
}
#endif
sprite.hotPhys.x = XE_KBPTR.rootX;
@@ -1034,13 +1034,13 @@ PlayReleasedEvents(void)
/* Translate back to the sprite screen since processInputProc
will translate from sprite screen to screen 0 upon reentry
to the DIX layer */
- if(!noXineramaExtension) {
+ if(!noPanoramiXExtension) {
qe->event->u.keyButtonPointer.rootX +=
- xineramaDataPtr[0].x -
- xineramaDataPtr[sprite.screen->myNum].x;
+ panoramiXdataPtr[0].x -
+ panoramiXdataPtr[sprite.screen->myNum].x;
qe->event->u.keyButtonPointer.rootY +=
- xineramaDataPtr[0].y -
- xineramaDataPtr[sprite.screen->myNum].y;
+ panoramiXdataPtr[0].y -
+ panoramiXdataPtr[sprite.screen->myNum].y;
}
#endif
(*qe->device->public.processInputProc)(qe->event, qe->device,
@@ -1706,7 +1706,7 @@ MaybeDeliverEventsToClient(pWin, pEvents, count, filter, dontClient)
if (wClient(pWin) == dontClient)
return 0;
#ifdef XINERAMA
- if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
return XineramaTryClientEventsResult(
wClient(pWin), NullGrab, pWin->eventMask, filter);
#endif
@@ -1720,7 +1720,7 @@ MaybeDeliverEventsToClient(pWin, pEvents, count, filter, dontClient)
if (SameClient(other, dontClient))
return 0;
#ifdef XINERAMA
- if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
return XineramaTryClientEventsResult(
rClient(other), NullGrab, other->mask, filter);
#endif
@@ -1863,7 +1863,7 @@ DeliverEvents(pWin, xE, count, otherParent)
int deliveries;
#ifdef XINERAMA
- if(!noXineramaExtension && pWin->drawable.pScreen->myNum)
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum)
return count;
#endif
@@ -1903,14 +1903,14 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
return TRUE;
#ifdef XINERAMA
- if(!noXineramaExtension && XineramaSetWindowPntrs(pWin)) {
+ if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) {
int i;
- for(i = 1; i < XineramaNumScreens; i++) {
+ for(i = 1; i < PanoramiXNumScreens; i++) {
if(POINT_IN_REGION(sprite.screen,
&sprite.windows[i]->borderSize,
- x + xineramaDataPtr[0].x - xineramaDataPtr[i].x,
- y + xineramaDataPtr[0].y - xineramaDataPtr[i].y,
+ x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
+ y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
&box))
return TRUE;
}
@@ -1974,7 +1974,7 @@ CheckMotion(xEvent *xE)
WindowPtr prevSpriteWin = sprite.win;
#ifdef XINERAMA
- if(!noXineramaExtension)
+ if(!noPanoramiXExtension)
return XineramaCheckMotion(xE);
#endif
@@ -2063,11 +2063,11 @@ DefineInitialRootWindow(win)
(*pScreen->DisplayCursor) (pScreen, sprite.current);
#ifdef XINERAMA
- if(!noXineramaExtension) {
- sprite.hotLimits.x1 = -xineramaDataPtr[0].x;
- sprite.hotLimits.y1 = -xineramaDataPtr[0].y;
- sprite.hotLimits.x2 = XineramaPixWidth - xineramaDataPtr[0].x;
- sprite.hotLimits.y2 = XineramaPixHeight - xineramaDataPtr[0].y;
+ if(!noPanoramiXExtension) {
+ sprite.hotLimits.x1 = -panoramiXdataPtr[0].x;
+ sprite.hotLimits.y1 = -panoramiXdataPtr[0].y;
+ sprite.hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x;
+ sprite.hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y;
sprite.physLimits = sprite.hotLimits;
sprite.confineWin = NullWindow;
#ifdef SHAPE
@@ -2104,11 +2104,11 @@ NewCurrentScreen(newScreen, x, y)
sprite.hotPhys.x = x;
sprite.hotPhys.y = y;
#ifdef XINERAMA
- if(!noXineramaExtension) {
- sprite.hotPhys.x += xineramaDataPtr[newScreen->myNum].x -
- xineramaDataPtr[0].x;
- sprite.hotPhys.y += xineramaDataPtr[newScreen->myNum].y -
- xineramaDataPtr[0].y;
+ if(!noPanoramiXExtension) {
+ sprite.hotPhys.x += panoramiXdataPtr[newScreen->myNum].x -
+ panoramiXdataPtr[0].x;
+ sprite.hotPhys.y += panoramiXdataPtr[newScreen->myNum].y -
+ panoramiXdataPtr[0].y;
if (newScreen != sprite.screen) {
sprite.screen = newScreen;
/* Make sure we tell the DDX to update its copy of the screen */
@@ -2120,10 +2120,10 @@ NewCurrentScreen(newScreen, x, y)
told of the pointer warp so we reposition it here */
if(!syncEvents.playingEvents)
(*sprite.screen->SetCursorPosition)(sprite.screen,
- sprite.hotPhys.x + xineramaDataPtr[0].x -
- xineramaDataPtr[sprite.screen->myNum].x,
- sprite.hotPhys.y + xineramaDataPtr[0].y -
- xineramaDataPtr[sprite.screen->myNum].y, FALSE);
+ sprite.hotPhys.x + panoramiXdataPtr[0].x -
+ panoramiXdataPtr[sprite.screen->myNum].x,
+ sprite.hotPhys.y + panoramiXdataPtr[0].y -
+ panoramiXdataPtr[sprite.screen->myNum].y, FALSE);
}
} else
#endif
@@ -2151,14 +2151,14 @@ XineramaPointInWindowIsVisible(
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
- xoff = x + xineramaDataPtr[0].x;
- yoff = y + xineramaDataPtr[0].y;
+ xoff = x + panoramiXdataPtr[0].x;
+ yoff = y + panoramiXdataPtr[0].y;
- for(i = 1; i < XineramaNumScreens; i++) {
+ for(i = 1; i < PanoramiXNumScreens; i++) {
pWin = sprite.windows[i];
pScreen = pWin->drawable.pScreen;
- x = xoff - xineramaDataPtr[i].x;
- y = yoff - xineramaDataPtr[i].y;
+ x = xoff - panoramiXdataPtr[i].x;
+ y = yoff - panoramiXdataPtr[i].y;
if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
return TRUE;
@@ -2198,8 +2198,8 @@ XineramaWarpPointer(ClientPtr client)
winX = source->drawable.x;
winY = source->drawable.y;
if(source == WindowTable[0]) {
- winX -= xineramaDataPtr[0].x;
- winY -= xineramaDataPtr[0].y;
+ winX -= panoramiXdataPtr[0].x;
+ winY -= panoramiXdataPtr[0].y;
}
if (x < winX + stuff->srcX ||
y < winY + stuff->srcY ||
@@ -2214,8 +2214,8 @@ XineramaWarpPointer(ClientPtr client)
x = dest->drawable.x;
y = dest->drawable.y;
if(dest == WindowTable[0]) {
- x -= xineramaDataPtr[0].x;
- y -= xineramaDataPtr[0].y;
+ x -= panoramiXdataPtr[0].x;
+ y -= panoramiXdataPtr[0].y;
}
}
@@ -2254,7 +2254,7 @@ ProcWarpPointer(client)
REQUEST_SIZE_MATCH(xWarpPointerReq);
#ifdef XINERAMA
- if(!noXineramaExtension)
+ if(!noPanoramiXExtension)
return XineramaWarpPointer(client);
#endif
@@ -2339,10 +2339,10 @@ BorderSizeNotEmpty(WindowPtr pWin)
return TRUE;
#ifdef XINERAMA
- if(!noXineramaExtension && XineramaSetWindowPntrs(pWin)) {
+ if(!noPanoramiXExtension && XineramaSetWindowPntrs(pWin)) {
int i;
- for(i = 1; i < XineramaNumScreens; i++) {
+ for(i = 1; i < PanoramiXNumScreens; i++) {
if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
return TRUE;
}
@@ -3354,7 +3354,7 @@ DoFocusEvents(dev, fromWin, toWin, mode)
TRUE);
/* Notify all the roots */
#ifdef XINERAMA
- if ( !noXineramaExtension )
+ if ( !noPanoramiXExtension )
FocusEvent(dev, FocusOut, mode, out, WindowTable[0]);
else
#endif
@@ -3373,7 +3373,7 @@ DoFocusEvents(dev, fromWin, toWin, mode)
}
/* Notify all the roots */
#ifdef XINERAMA
- if ( !noXineramaExtension )
+ if ( !noPanoramiXExtension )
FocusEvent(dev, FocusIn, mode, in, WindowTable[0]);
else
#endif
@@ -3391,7 +3391,7 @@ DoFocusEvents(dev, fromWin, toWin, mode)
FocusOutEvents(dev, sprite.win, ROOT, mode, NotifyPointer,
TRUE);
#ifdef XINERAMA
- if ( !noXineramaExtension )
+ if ( !noPanoramiXExtension )
FocusEvent(dev, FocusOut, mode, out, WindowTable[0]);
else
#endif
@@ -3905,12 +3905,12 @@ ProcQueryPointer(client)
}
#ifdef XINERAMA
- if(!noXineramaExtension) {
- rep.rootX += xineramaDataPtr[0].x;
- rep.rootY += xineramaDataPtr[0].y;
+ if(!noPanoramiXExtension) {
+ rep.rootX += panoramiXdataPtr[0].x;
+ rep.rootY += panoramiXdataPtr[0].y;
if(stuff->id == rep.root) {
- rep.winX += xineramaDataPtr[0].x;
- rep.winY += xineramaDataPtr[0].y;
+ rep.winX += panoramiXdataPtr[0].x;
+ rep.winY += panoramiXdataPtr[0].y;
}
}
#endif
@@ -4373,7 +4373,7 @@ CheckCursorConfinement(pWin)
WindowPtr confineTo;
#ifdef XINERAMA
- if(!noXineramaExtension && pWin->drawable.pScreen->myNum) return;
+ if(!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return;
#endif
if (grab && (confineTo = grab->confineTo))
@@ -4433,7 +4433,7 @@ ProcRecolorCursor(client)
{
pscr = screenInfo.screens[nscr];
#ifdef XINERAMA
- if(!noXineramaExtension)
+ if(!noPanoramiXExtension)
displayed = (pscr == sprite.screen);
else
#endif
@@ -4462,8 +4462,8 @@ WriteEventsToClient(pClient, count, events)
#endif
#ifdef XINERAMA
- if(!noXineramaExtension &&
- (xineramaDataPtr[0].x || xineramaDataPtr[0].y))
+ if(!noPanoramiXExtension &&
+ (panoramiXdataPtr[0].x || panoramiXdataPtr[0].y))
{
switch(events->u.u.type) {
case MotionNotify:
@@ -4480,13 +4480,13 @@ WriteEventsToClient(pClient, count, events)
*/
count = 1; /* should always be 1 */
memcpy(&eventCopy, events, sizeof(xEvent));
- eventCopy.u.keyButtonPointer.rootX += xineramaDataPtr[0].x;
- eventCopy.u.keyButtonPointer.rootY += xineramaDataPtr[0].y;
+ eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x;
+ eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y;
if(eventCopy.u.keyButtonPointer.event ==
eventCopy.u.keyButtonPointer.root)
{
- eventCopy.u.keyButtonPointer.eventX += xineramaDataPtr[0].x;
- eventCopy.u.keyButtonPointer.eventY += xineramaDataPtr[0].y;
+ eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x;
+ eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y;
}
events = &eventCopy;
break;