Re: [PATCH x11proto-fixes (v2)] fixesproto v6: Pointer barrier thresholds
sorry about the lag On Mon, May 21, 2012 at 04:18:49PM +1000, Christopher James Halse Rogers wrote: v2: Use a GenericEvent for BarrierNotify Add PointerReleased event type Clarify scope of barrier event-id Release multiple barriers in a single ReleasePointer call. --- configure.ac |2 +- fixesproto.txt | 132 +++- xfixesproto.h | 64 +++ xfixeswire.h | 20 - 4 files changed, 214 insertions(+), 4 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..6035f1d 100644 --- a/fixesproto.txt +++ b/fixesproto.txt @@ -1,5 +1,5 @@ The XFIXES Extension - Version 5.0 + Version 6.0 Document Revision 1 2010-11-15 Keith Packard @@ -650,6 +650,136 @@ DestroyPointerBarrier Errors: Barrier +* XFIXES VERSION 6 OR BETTER *** + +13. Pointer Barriers Expansion + +This update extends pointer barriers to optionally allow the pointer through +when a threshold is reached. This can be useful for desktop environments that +wish to use a large region of the screen, such as an entire edge, to provide a +casual target while allowing determined movement to pass through. + +13.1 Types + + BarrierEvent: {Hit, ThresholdExceeded, PointerReleased} + BarrierEventID: CARD32 + BarrierEventDetails:{ barrier: BARRIER, + type: BarrierEvent, + event-id: BarrierEventID } + +13.2 Events + +BarrierNotify + + type: BYTE + extension: CARD8 + sequenceNumber: CARD16 + length: CARD32 + evtype: CARD16 + window: WINDOW + x, y: INT16 + dx, dy: FP3232 + raw-dx, raw-dy: FP3232 + dt: INT16 + deviceid: DEVICEID + details:LISTofBarrierEventDetails you'll need an extra field to list how many details there are. In the core protocol, these are generally determined by the size of the request/reply but to keep those extendable I prefer to have a separate field that lists the number of elements. [edit: now that I see the header file, it's there in the struct, should be listed here separately though] + + BarrierNotify uses the X Generic Event extension. Type is thus always + GenericEvent (35), extension is the major opcode of this extension, + sequenceNumber is the low 16 bits of the request sequence number, + length is how much bigger than 32 bytes the event is, in units of + 4 bytes. Evtype is the type of this event, which is always + BarrierNotify (0). + + (x, y) contain the coordinates of the pointer after restriction by + any applicable barriers or server-side clamping (such as to screen + edges). + + (dx, dy) and (raw-dx, raw-dy) are the valuators for the input event + which caused the BarrierNotify to be emitted, before any clamping + (such as to the screen edge, or by a barrier) is applied. + (dx, dy) are the values after acceleration, (raw-dx, raw-dy) are the + raw values before any acceleration is applied. dt is the server time + in milliseconds since the last input event, and deviceid is the id of + the input device which triggered the barrier. + + Each item in the details list contains the information for a barrier + triggered by this input event. If there are multiple overlapping + barriers blocking pointer motion each one will be represented in + this list. + + barrier is the ID of the barrier hit. + + Type indicates the trigger of the event: + Hit when the barrier has prevented pointer movement. + ThresholdExceeded when the barrier has been hit but has not + prevented pointer movement due to the threshold being exceeded. + PointerReleased when the barrier would have blocked motion but + has been rendered permeable by a BarrierReleasePointer request. + + event-id is an identifier for this barrier event. A barrier event + begins when the pointer is first
[PATCH x11proto-fixes (v2)] fixesproto v6: Pointer barrier thresholds
v2: Use a GenericEvent for BarrierNotify Add PointerReleased event type Clarify scope of barrier event-id Release multiple barriers in a single ReleasePointer call. --- configure.ac |2 +- fixesproto.txt | 132 +++- xfixesproto.h | 64 +++ xfixeswire.h | 20 - 4 files changed, 214 insertions(+), 4 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..6035f1d 100644 --- a/fixesproto.txt +++ b/fixesproto.txt @@ -1,5 +1,5 @@ The XFIXES Extension - Version 5.0 + Version 6.0 Document Revision 1 2010-11-15 Keith Packard @@ -650,6 +650,136 @@ DestroyPointerBarrier Errors: Barrier +* XFIXES VERSION 6 OR BETTER *** + +13. Pointer Barriers Expansion + +This update extends pointer barriers to optionally allow the pointer through +when a threshold is reached. This can be useful for desktop environments that +wish to use a large region of the screen, such as an entire edge, to provide a +casual target while allowing determined movement to pass through. + +13.1 Types + + BarrierEvent: {Hit, ThresholdExceeded, PointerReleased} + BarrierEventID: CARD32 + BarrierEventDetails:{ barrier: BARRIER, + type: BarrierEvent, + event-id: BarrierEventID } + +13.2 Events + +BarrierNotify + + type: BYTE + extension: CARD8 + sequenceNumber: CARD16 + length: CARD32 + evtype: CARD16 + window: WINDOW + x, y: INT16 + dx, dy: FP3232 + raw-dx, raw-dy: FP3232 + dt: INT16 + deviceid: DEVICEID + details:LISTofBarrierEventDetails + + BarrierNotify uses the X Generic Event extension. Type is thus always + GenericEvent (35), extension is the major opcode of this extension, + sequenceNumber is the low 16 bits of the request sequence number, + length is how much bigger than 32 bytes the event is, in units of + 4 bytes. Evtype is the type of this event, which is always + BarrierNotify (0). + + (x, y) contain the coordinates of the pointer after restriction by + any applicable barriers or server-side clamping (such as to screen + edges). + + (dx, dy) and (raw-dx, raw-dy) are the valuators for the input event + which caused the BarrierNotify to be emitted, before any clamping + (such as to the screen edge, or by a barrier) is applied. + (dx, dy) are the values after acceleration, (raw-dx, raw-dy) are the + raw values before any acceleration is applied. dt is the server time + in milliseconds since the last input event, and deviceid is the id of + the input device which triggered the barrier. + + Each item in the details list contains the information for a barrier + triggered by this input event. If there are multiple overlapping + barriers blocking pointer motion each one will be represented in + this list. + + barrier is the ID of the barrier hit. + + Type indicates the trigger of the event: +Hit when the barrier has prevented pointer movement. +ThresholdExceeded when the barrier has been hit but has not + prevented pointer movement due to the threshold being exceeded. +PointerReleased when the barrier would have blocked motion but + has been rendered permeable by a BarrierReleasePointer request. + + event-id is an identifier for this barrier event. A barrier event + begins when the pointer is first restricted by the barrier and remains + valid until the first input event from deviceid which is not + restricted by the barrier. The event-id is unique per-barrier. + + Since a barrier event is associated with a deviceid there can be more + than one event active for a given barrier simultaneously. + + +13.3 Requests + +SelectBarrierInput + + window: WINDOW + event-mask: SETofBarrierEvent + +