From 7921ed815c81c4867b96295ca99c0528dc34b206 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 13 Oct 2011 12:19:18 +0100 Subject: [PATCH] Add support for showing/hiding cursors per-sprite Signed-off-by: Daniel Stone --- configure.ac | 2 +- fixesproto.txt | 42 ++++++++++++++++++++++++++++++++++++++++++ xfixesproto.h | 24 ++++++++++++++++++++++++ xfixeswire.h | 7 +++++-- 4 files changed, 72 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f85b802..07dd29a 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) -AC_INIT([FixesProto], [5.0], +AC_INIT([FixesProto], [6.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE diff --git a/fixesproto.txt b/fixesproto.txt index 5903ac9..af2bd9c 100644 --- a/fixesproto.txt +++ b/fixesproto.txt @@ -650,6 +650,48 @@ DestroyPointerBarrier Errors: Barrier +************* XFIXES VERSION 6 OR BETTER *********** + +13. Pointer Barriers + +Compositing managers and desktop environments may have UI elements in +particular screen locations such that for a single-headed display they +correspond to easy targets according to Fitt's Law, for example, the top +left corner. For a multi-headed environment these corners should still be +semi-impermeable. Pointer barriers allow the application to define +additional constraint on cursor motion so that these areas behave as +expected even in the face of multiple displays. + +Absolute positioning devices like touchscreens do not obey pointer barriers. +There's no advantage to target acquisition to do so, since on a touchscreen +all points are in some sense equally large, whereas for a relative +positioning device the edges and corners are infinitely large. + +WarpPointer and similar requests do not obey pointer barriers, for +essentially the same reason. + +13.1 Requests + +HideDeviceCursor + + device: DEVICEID + window: WINDOW + + The same as HideCursor, except only affects the sprite applying + to the given device. + + Errors: Window, Device + +ShowDeviceCursor + + device: DEVICEID + window: WINDOW + + The same as ShowCursor, except only affects the sprite applying + to the given device. + + Errors: Window, Device + 99. Future compatibility This extension is not expected to remain fixed. Future changes will diff --git a/xfixesproto.h b/xfixesproto.h index fcf409a..b7b18c2 100644 --- a/xfixesproto.h +++ b/xfixesproto.h @@ -532,6 +532,30 @@ typedef struct { #define sz_xXFixesDestroyPointerBarrierReq 8 +/*************** Version 6.0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + CARD16 device B16; + CARD16 pad B16; +} xXFixesHideDeviceCursorReq; + +#define sz_xXFixesHideDeviceCursorReq sizeof(xXFixesHideDeviceCursorReq) + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + CARD16 device B16; + CARD16 pad B16; +} xXFixesShowDeviceCursorReq; + +#define sz_xXFixesShowDeviceCursorReq sizeof(xXFixesShowDeviceCursorReq) + #undef Barrier #undef Region #undef Picture diff --git a/xfixeswire.h b/xfixeswire.h index 432349a..d7f60b2 100644 --- a/xfixeswire.h +++ b/xfixeswire.h @@ -48,7 +48,7 @@ #define _XFIXESWIRE_H_ #define XFIXES_NAME "XFIXES" -#define XFIXES_MAJOR 5 +#define XFIXES_MAJOR 6 #define XFIXES_MINOR 0 /*************** Version 1 ******************/ @@ -89,8 +89,11 @@ /*************** Version 5 ******************/ #define X_XFixesCreatePointerBarrier 31 #define X_XFixesDestroyPointerBarrier 32 +/*************** Version 6 ******************/ +#define X_XFixesHideDeviceCursor 33 +#define X_XFixesShowDeviceCursor 34 -#define XFixesNumberRequests (X_XFixesDestroyPointerBarrier+1) +#define XFixesNumberRequests (X_XFixesShowDeviceCursor+1) /* Selection events share one event number */ #define XFixesSelectionNotify 0 -- 1.7.7