dix: Moving SpriteRec into DeviceIntRec
removing global sprite structure beginning to remove MPX ifdefs xnest: Fix to make xnest compile again
This commit is contained in:
parent
eb1d9f51af
commit
ae3c24da34
22
Changelog
22
Changelog
|
@ -1,4 +1,26 @@
|
|||
MPX Changelog file
|
||||
== 12.12.06 ==
|
||||
dix: Moving SpriteRec into DeviceIntRec
|
||||
removing global sprite structure
|
||||
beginning to remove MPX ifdefs
|
||||
|
||||
xnest: Fix to make xnest compile again
|
||||
|
||||
Files:
|
||||
dix/getevents.c
|
||||
dix/events.c
|
||||
dix/devices.c
|
||||
hw/xfree86/common/xf86Xinput.c
|
||||
include/cursor.h
|
||||
include/dix.h
|
||||
include/dixevents.h
|
||||
include/input.h
|
||||
include/inputstr.h
|
||||
XTrap/xtrapdi.c
|
||||
Xext/xtest.c
|
||||
hw/xnest/Events.c
|
||||
record/record.c
|
||||
|
||||
== 05.12.06 ==
|
||||
Xi: adding MPX checks to ProcessOtherEvents
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#endif
|
||||
#include "pixmapstr.h" /* DrawableRec */
|
||||
#include "windowstr.h" /* Drawable Lookup structures */
|
||||
#include "inputstr.h"
|
||||
#include <X11/extensions/xtrapdi.h>
|
||||
#include <X11/extensions/xtrapddmi.h>
|
||||
#include <X11/extensions/xtrapproto.h>
|
||||
|
@ -1564,7 +1565,7 @@ void XETrapStampAndMail(xEvent *x_event)
|
|||
data.u.event.u.u.type == ButtonRelease ||
|
||||
data.u.event.u.u.type == KeyPress ||
|
||||
data.u.event.u.u.type == KeyRelease)) {
|
||||
int scr = XineramaGetCursorScreen();
|
||||
int scr = XineramaGetCursorScreen(inputInfo.pointer);
|
||||
data.u.event.u.keyButtonPointer.rootX +=
|
||||
panoramiXdataPtr[scr].x - panoramiXdataPtr[0].x;
|
||||
data.u.event.u.keyButtonPointer.rootY +=
|
||||
|
|
|
@ -148,7 +148,7 @@ ProcXTestCompareCursor(client)
|
|||
if (stuff->cursor == None)
|
||||
pCursor = NullCursor;
|
||||
else if (stuff->cursor == XTestCurrentCursor)
|
||||
pCursor = GetSpriteCursor();
|
||||
pCursor = GetSpriteCursor(inputInfo.pointer);
|
||||
else {
|
||||
pCursor = (CursorPtr)LookupIDByType(stuff->cursor, RT_CURSOR);
|
||||
if (!pCursor)
|
||||
|
@ -426,7 +426,8 @@ ProcXTestFakeInput(client)
|
|||
|
||||
#ifdef PANORAMIX
|
||||
if ((!noPanoramiXExtension
|
||||
&& root->drawable.pScreen->myNum != XineramaGetCursorScreen())
|
||||
&& root->drawable.pScreen->myNum
|
||||
!= XineramaGetCursorScreen(inputInfo.pointer))
|
||||
|| (noPanoramiXExtension && root != GetCurrentRootWindow()))
|
||||
|
||||
#else
|
||||
|
|
|
@ -366,8 +366,12 @@ InitCoreDevices()
|
|||
if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex))
|
||||
FatalError("Couldn't allocate pointer devPrivates\n");
|
||||
dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL;
|
||||
InitSprite(dev, TRUE);
|
||||
(void)ActivateDevice(dev);
|
||||
inputInfo.pointer = dev;
|
||||
/* the core keyboard is initialised by now. set the keyboard's sprite
|
||||
* to the core pointer's sprite. */
|
||||
InitSprite(inputInfo.keyboard, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
865
dix/events.c
865
dix/events.c
File diff suppressed because it is too large
Load Diff
|
@ -488,11 +488,6 @@ GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
|
|||
* The DDX is responsible for allocating the event structure in the first
|
||||
* place via GetMaximumEventsNum(), and for freeing it.
|
||||
*/
|
||||
#ifdef MPX
|
||||
/* In MPX, flags can be set to POINTER_MULTIPOINTER to indicate that the
|
||||
* device is a multipointer device. MP devices always send core events.
|
||||
*/
|
||||
#endif
|
||||
_X_EXPORT int
|
||||
GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
||||
int flags, int first_valuator, int num_valuators,
|
||||
|
@ -543,7 +538,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
kbp->deviceid = pDev->id;
|
||||
|
||||
#ifdef MPX
|
||||
if (flags & POINTER_MULTIPOINTER)
|
||||
if (pDev->isMPDev)
|
||||
pointer = pDev;
|
||||
else
|
||||
#endif
|
||||
|
@ -604,7 +599,7 @@ GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons,
|
|||
updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators);
|
||||
|
||||
#ifdef MPX
|
||||
if (flags & POINTER_MULTIPOINTER)
|
||||
if (pDev->isMPDev)
|
||||
{
|
||||
// noop, just less intrusive to fit MPX in like that
|
||||
} else
|
||||
|
@ -800,7 +795,11 @@ SwitchCorePointer(DeviceIntPtr pDev)
|
|||
* to shift the pointer to get it inside the new bounds.
|
||||
*/
|
||||
void
|
||||
PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time)
|
||||
PostSyntheticMotion(DeviceIntPtr pDev,
|
||||
int x,
|
||||
int y,
|
||||
ScreenPtr pScreen,
|
||||
unsigned long time)
|
||||
{
|
||||
xEvent xE;
|
||||
|
||||
|
@ -820,5 +819,5 @@ PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time)
|
|||
xE.u.keyButtonPointer.rootY = y;
|
||||
xE.u.keyButtonPointer.time = time;
|
||||
|
||||
(*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1);
|
||||
(*pDev->public.processInputProc)(&xE, pDev, 1);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
*/
|
||||
/* $XConsortium: xf86Xinput.c /main/14 1996/10/27 11:05:25 kaleb $ */
|
||||
|
||||
#ifdef MPX
|
||||
/*
|
||||
* MPX additions:
|
||||
* Copyright © 2006 Peter Hutterer
|
||||
|
@ -55,7 +54,6 @@
|
|||
* Author: Peter Hutterer <peter@cs.unisa.edu.au>
|
||||
*
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
|
@ -144,12 +142,10 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
|
|||
xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name);
|
||||
}
|
||||
|
||||
#ifdef MPX
|
||||
if (xf86SetBoolOption(list, "IsMPDevice", 0)) {
|
||||
local->flags |= XI86_MP_DEVICE;
|
||||
xf86Msg(X_CONFIG, "%s: is MP device\n", local->name);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (xf86SetBoolOption(list, "SendDragEvents", 1)) {
|
||||
local->flags |= XI86_SEND_DRAG_EVENTS;
|
||||
|
@ -214,12 +210,9 @@ xf86ActivateDevice(LocalDevicePtr local)
|
|||
xf86XinputFinalizeInit(dev);
|
||||
|
||||
dev->coreEvents = local->flags & XI86_ALWAYS_CORE;
|
||||
#ifdef MPX
|
||||
if (local->flags & XI86_MP_DEVICE)
|
||||
dev->isMPDev = TRUE;
|
||||
else
|
||||
dev->isMPDev = FALSE;
|
||||
#endif
|
||||
dev->isMPDev = (local->flags & XI86_MP_DEVICE);
|
||||
InitSprite(dev, dev->isMPDev);
|
||||
|
||||
RegisterOtherDevice(dev);
|
||||
|
||||
if (serverGeneration == 1)
|
||||
|
@ -466,11 +459,6 @@ xf86PostMotionEvent(DeviceIntPtr device,
|
|||
else
|
||||
flags = POINTER_RELATIVE | POINTER_ACCELERATE;
|
||||
|
||||
#ifdef MPX
|
||||
if (device->isMPDev)
|
||||
flags |= POINTER_MULTIPOINTER;
|
||||
#endif
|
||||
|
||||
valuators = xcalloc(sizeof(int), num_valuators);
|
||||
|
||||
va_start(var, num_valuators);
|
||||
|
@ -543,11 +531,6 @@ xf86PostButtonEvent(DeviceIntPtr device,
|
|||
else
|
||||
flags = POINTER_RELATIVE;
|
||||
|
||||
#ifdef MPX
|
||||
if (device->isMPDev)
|
||||
flags |= POINTER_MULTIPOINTER;
|
||||
#endif
|
||||
|
||||
valuators = xcalloc(sizeof(int), num_valuators);
|
||||
|
||||
va_start(var, num_valuators);
|
||||
|
|
|
@ -25,6 +25,7 @@ is" without express or implied warranty.
|
|||
#include "scrnintstr.h"
|
||||
#include "windowstr.h"
|
||||
#include "servermd.h"
|
||||
#include "inputstr.h"
|
||||
|
||||
#include "mi.h"
|
||||
|
||||
|
@ -183,7 +184,7 @@ xnestCollectEvents()
|
|||
if (X.xcrossing.detail != NotifyInferior) {
|
||||
pScreen = xnestScreen(X.xcrossing.window);
|
||||
if (pScreen) {
|
||||
NewCurrentScreen(pScreen, X.xcrossing.x, X.xcrossing.y);
|
||||
NewCurrentScreen(inputInfo.pointer, pScreen, X.xcrossing.x, X.xcrossing.y);
|
||||
valuators[0] = X.xcrossing.x;
|
||||
valuators[1] = X.xcrossing.y;
|
||||
lastEventTime = GetTimeInMillis();
|
||||
|
|
|
@ -144,7 +144,7 @@ extern void GetSpritePosition(
|
|||
int * /*py*/);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern int XineramaGetCursorScreen(void);
|
||||
extern int XineramaGetCursorScreen(struct _DeviceIntRec* pDev);
|
||||
#endif /* PANORAMIX */
|
||||
|
||||
#endif /* CURSOR_H */
|
||||
|
|
|
@ -649,6 +649,10 @@ extern int GrabDevice(
|
|||
CARD8 * /* status */);
|
||||
|
||||
extern void InitEvents(void);
|
||||
extern void InitSprite(
|
||||
DeviceIntPtr /* pDev */,
|
||||
Bool /* hasCursor */
|
||||
);
|
||||
|
||||
extern void CloseDownEvents(void);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
|
||||
extern void SetCriticalEvent(int /* event */);
|
||||
|
||||
extern CursorPtr GetSpriteCursor(void);
|
||||
extern CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev*/);
|
||||
|
||||
extern int ProcAllowEvents(ClientPtr /* client */);
|
||||
|
||||
|
@ -103,7 +103,11 @@ extern int ProcUngrabButton(ClientPtr /* client */);
|
|||
extern int ProcRecolorCursor(ClientPtr /* client */);
|
||||
|
||||
#ifdef PANORAMIX
|
||||
extern void PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time);
|
||||
extern void PostSyntheticMotion(DeviceIntPtr pDev,
|
||||
int x,
|
||||
int y,
|
||||
ScreenPtr pScreen,
|
||||
unsigned long time);
|
||||
#endif
|
||||
|
||||
#endif /* DIXEVENTS_H */
|
||||
|
|
|
@ -62,9 +62,6 @@ SOFTWARE.
|
|||
#define POINTER_RELATIVE (1 << 1)
|
||||
#define POINTER_ABSOLUTE (1 << 2)
|
||||
#define POINTER_ACCELERATE (1 << 3)
|
||||
#ifdef MPX
|
||||
#define POINTER_MULTIPOINTER (1 << 4)
|
||||
#endif
|
||||
|
||||
#define MAP_LENGTH 256
|
||||
#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
|
||||
|
@ -422,6 +419,7 @@ extern int GetProximityEvents(
|
|||
int *valuators);
|
||||
|
||||
extern void PostSyntheticMotion(
|
||||
DeviceIntPtr pDev,
|
||||
int x,
|
||||
int y,
|
||||
ScreenPtr pScreen,
|
||||
|
|
|
@ -52,6 +52,7 @@ SOFTWARE.
|
|||
#include "input.h"
|
||||
#include "window.h"
|
||||
#include "dixstruct.h"
|
||||
#include "cursorstr.h"
|
||||
|
||||
#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
|
||||
|
||||
|
@ -264,6 +265,30 @@ typedef struct _LedFeedbackClassRec {
|
|||
#endif
|
||||
} LedFeedbackClassRec;
|
||||
|
||||
|
||||
/**
|
||||
* Sprite information for a device.
|
||||
*/
|
||||
typedef struct {
|
||||
CursorPtr current;
|
||||
BoxRec hotLimits; /* logical constraints of hot spot */
|
||||
Bool confined; /* confined to screen */
|
||||
#if defined(SHAPE) || defined(PANORAMIX)
|
||||
RegionPtr hotShape; /* additional logical shape constraint */
|
||||
#endif
|
||||
BoxRec physLimits; /* physical constraints of hot spot */
|
||||
WindowPtr win; /* window of logical position */
|
||||
HotSpot hot; /* logical pointer position */
|
||||
HotSpot hotPhys; /* physical pointer position */
|
||||
#ifdef PANORAMIX
|
||||
ScreenPtr screen; /* all others are in Screen 0 coordinates */
|
||||
RegionRec Reg1; /* Region 1 for confining motion */
|
||||
RegionRec Reg2; /* Region 2 for confining virtual motion */
|
||||
WindowPtr windows[MAXSCREENS];
|
||||
WindowPtr confineWin; /* confine window */
|
||||
#endif
|
||||
} SpriteRec, *SpritePtr;
|
||||
|
||||
/* states for devices */
|
||||
|
||||
#define NOT_GRABBED 0
|
||||
|
@ -329,9 +354,8 @@ typedef struct _DeviceIntRec {
|
|||
DevUnion *devPrivates;
|
||||
int nPrivates;
|
||||
DeviceUnwrapProc unwrapProc;
|
||||
#ifdef MPX
|
||||
Bool isMPDev; /* TRUE if multipointer device */
|
||||
#endif
|
||||
SpritePtr pSprite; /* sprite information */
|
||||
} DeviceIntRec;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -43,6 +43,7 @@ and Jim Haggerty of Metheus.
|
|||
#include <X11/extensions/recordstr.h>
|
||||
#include "set.h"
|
||||
#include "swaprep.h"
|
||||
#include "inputstr.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
@ -861,7 +862,7 @@ RecordADeviceEvent(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
|
|||
pev->u.u.type == ButtonRelease ||
|
||||
pev->u.u.type == KeyPress ||
|
||||
pev->u.u.type == KeyRelease)) {
|
||||
int scr = XineramaGetCursorScreen();
|
||||
int scr = XineramaGetCursorScreen(inputInfo.pointer);
|
||||
memcpy(&shiftedEvent, pev, sizeof(xEvent));
|
||||
shiftedEvent.u.keyButtonPointer.rootX +=
|
||||
panoramiXdataPtr[scr].x -
|
||||
|
|
Loading…
Reference in New Issue
Block a user