mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-19 20:02:21 +00:00
cursor: Move pointer barrier code over to XI
In order to send events to specific windows associated with the barrier, we need to move the code that handles barriers to somewhere where it's easier to construct and send events. Rather than duplicating XSync with its XSyncSelectAlarm, re-use the existing XI infrastructure. For now, just move a bunch of code over, rename some things, and initialize the new structures, but still consider it a separate codebase. Pointer barrier requests are still handled by XFixes, so this is a weird intermediate state. It's unknown whether we'll add explicit requests to pointer barriers inside XI. Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
b34cffd27b
commit
482e0cb352
6 changed files with 606 additions and 444 deletions
|
|
@ -30,7 +30,6 @@
|
|||
#include "resource.h"
|
||||
|
||||
extern _X_EXPORT RESTYPE RegionResType;
|
||||
extern _X_EXPORT RESTYPE PointerBarrierType;
|
||||
extern _X_EXPORT int XFixesErrorBase;
|
||||
|
||||
#define VERIFY_REGION(pRegion, rid, client, mode) \
|
||||
|
|
@ -52,20 +51,6 @@ extern _X_EXPORT int XFixesErrorBase;
|
|||
extern _X_EXPORT RegionPtr
|
||||
XFixesRegionCopy(RegionPtr pRegion);
|
||||
|
||||
struct PointerBarrier {
|
||||
CARD16 x1, x2, y1, y2;
|
||||
CARD32 directions;
|
||||
};
|
||||
|
||||
extern int
|
||||
barrier_get_direction(int, int, int, int);
|
||||
extern BOOL
|
||||
barrier_is_blocking(const struct PointerBarrier *, int, int, int, int,
|
||||
double *);
|
||||
extern BOOL barrier_is_blocking_direction(const struct PointerBarrier *, int);
|
||||
extern void
|
||||
|
||||
barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x,
|
||||
int *y);
|
||||
#include "xibarriers.h"
|
||||
|
||||
#endif /* _XFIXES_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue