mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 14:00:03 +01:00
Revert "dix: drop superfluous XineramaGetCursorScreen()"
This reverts commit 6c7c4fdc7e.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2058>
This commit is contained in:
parent
777de747b9
commit
372ca9114c
3 changed files with 20 additions and 2 deletions
13
dix/events.c
13
dix/events.c
|
|
@ -1053,6 +1053,19 @@ GetSpritePosition(DeviceIntPtr pDev, int *px, int *py)
|
||||||
*py = pSprite->hotPhys.y;
|
*py = pSprite->hotPhys.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PANORAMIX
|
||||||
|
int
|
||||||
|
XineramaGetCursorScreen(DeviceIntPtr pDev)
|
||||||
|
{
|
||||||
|
if (!noPanoramiXExtension) {
|
||||||
|
return pDev->spriteInfo->sprite->screen->myNum;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* PANORAMIX */
|
||||||
|
|
||||||
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
#define TIMESLOP (5 * 60 * 1000) /* 5 minutes */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@ SOFTWARE.
|
||||||
/* Provide support for alpha composited cursors */
|
/* Provide support for alpha composited cursors */
|
||||||
#define ARGB_CURSOR
|
#define ARGB_CURSOR
|
||||||
|
|
||||||
|
struct _DeviceIntRec;
|
||||||
|
|
||||||
typedef struct _Cursor *CursorPtr;
|
typedef struct _Cursor *CursorPtr;
|
||||||
// FUN FACT: If you typedef a pointer type, like the `CursorPtr` above
|
// FUN FACT: If you typedef a pointer type, like the `CursorPtr` above
|
||||||
// then `const CursorPtr` or `CursorPtr const` actually means `struct _Cursor *const`, a constant pointer
|
// then `const CursorPtr` or `CursorPtr const` actually means `struct _Cursor *const`, a constant pointer
|
||||||
|
|
@ -68,4 +70,8 @@ typedef struct _CursorMetric *CursorMetricPtr;
|
||||||
extern _X_EXPORT int FreeCursor(void *pCurs,
|
extern _X_EXPORT int FreeCursor(void *pCurs,
|
||||||
XID cid);
|
XID cid);
|
||||||
|
|
||||||
|
#ifdef PANORAMIX
|
||||||
|
extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec *pDev);
|
||||||
|
#endif /* PANORAMIX */
|
||||||
|
|
||||||
#endif /* CURSOR_H */
|
#endif /* CURSOR_H */
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ and Jim Haggerty of Metheus.
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
#include "dix/cursor_priv.h"
|
|
||||||
#include "dix/eventconvert.h"
|
#include "dix/eventconvert.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
|
|
||||||
|
|
@ -722,7 +721,7 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP,
|
||||||
pev->u.u.type == ButtonPress ||
|
pev->u.u.type == ButtonPress ||
|
||||||
pev->u.u.type == ButtonRelease ||
|
pev->u.u.type == ButtonRelease ||
|
||||||
pev->u.u.type == KeyPress || pev->u.u.type == KeyRelease)) {
|
pev->u.u.type == KeyPress || pev->u.u.type == KeyRelease)) {
|
||||||
int scr = inputInfo.pointer->spriteInfo->sprite->screen->myNum;
|
int scr = XineramaGetCursorScreen(inputInfo.pointer);
|
||||||
|
|
||||||
memcpy(&shiftedEvent, pev, sizeof(xEvent));
|
memcpy(&shiftedEvent, pev, sizeof(xEvent));
|
||||||
shiftedEvent.u.keyButtonPointer.rootX +=
|
shiftedEvent.u.keyButtonPointer.rootX +=
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue