[PATCH] xfree86: add option "Floating", deprecate SendCoreEvents and friends.

Peter Hutterer peter.hutterer at who-t.net
Sun Dec 5 23:02:03 PST 2010


On Mon, Dec 06, 2010 at 04:50:17PM +1000, Peter Hutterer wrote:
> Some devices should be initialised as floating from the start (e.g.
> Joysticks and accelerometers benefit from this). Currently users use the
> "SendCoreEvents" "off" flag for this, which isn't the most appropriate
> naming.
> 
> Add an option "Floating", deprecate the others. Still parsed and handled by
> the server.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  hw/xfree86/common/xf86Xinput.c       |    3 +-
>  hw/xfree86/doc/devel/Registry        |    1 +
>  hw/xfree86/doc/man/xorg.conf.man.pre |   48 +++++++++++++++++++++------------
>  3 files changed, 33 insertions(+), 19 deletions(-)
> 
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index 2e0d80b..3a30f4f 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -280,7 +280,8 @@ void
>  xf86ProcessCommonOptions(InputInfoPtr pInfo,
>                           pointer	list)
>  {
> -    if (!xf86SetBoolOption(list, "AlwaysCore", 1) ||
> +    if (xf86SetBoolOption(list, "Float", 0) ||

this should read "Floating", the git commit --amend screwed up.

Cheers,
  Peter

> +        !xf86SetBoolOption(list, "AlwaysCore", 1) ||
>          !xf86SetBoolOption(list, "SendCoreEvents", 1) ||
>          !xf86SetBoolOption(list, "CorePointer", 1) ||
>          !xf86SetBoolOption(list, "CoreKeyboard", 1)) {
> diff --git a/hw/xfree86/doc/devel/Registry b/hw/xfree86/doc/devel/Registry
> index e09228b..48e24a2 100644
> --- a/hw/xfree86/doc/devel/Registry
> +++ b/hw/xfree86/doc/devel/Registry
> @@ -243,6 +243,7 @@ DemandLoad                O     I    ??
>  Device                    S     I    Device file name
>  DeviceName                S     I    Input device name
>  FlowControl               S     I    Serial flow control ("xon", "none")
> +Floating                  B     I    Device initialised as floating
>  HistorySize               I     I    ??
>  MaxX                      I     I    Maximum X coordinate
>  MaxY                      I     I    Maximum Y coordinate
> diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
> index ba876c0..e3fd0ea 100644
> --- a/hw/xfree86/doc/man/xorg.conf.man.pre
> +++ b/hw/xfree86/doc/man/xorg.conf.man.pre
> @@ -904,30 +904,42 @@ the server. This affects implied layouts as well as explicit layouts
>  specified in the configuration and/or on the command line.
>  .TP 7
>  .BI "Option \*qCorePointer\*q"
> -Deprecated, use
> -.B SendCoreEvents
> -instead.
> +Deprecated, see
> +.B Floating
>  .TP 7
>  .BI "Option \*qCoreKeyboard\*q"
> -Deprecated, use
> -.B SendCoreEvents
> -instead.
> +Deprecated, see
> +.B Floating
>  .TP 7
>  .BI "Option \*qAlwaysCore\*q  \*q" boolean \*q
> -.B
> -Deprecated, use
> -.B SendCoreEvents
> -instead.
> +Deprecated, see
> +.B Floating
>  .TP 7
>  .BI "Option \*qSendCoreEvents\*q  \*q" boolean \*q
> -Both of these options are equivalent, and when enabled cause the
> -input device to report core events through the master device. They are
> -enabled by default.  Any device configured to send core events will be
> -attached to the virtual core pointer or keyboard and control the cursor by
> -default. Devices with
> -.B SendCoreEvents
> -disabled will be \*qfloating\*q and only accessible by clients employing the
> -X Input extension. This option controls the startup behavior only, a device
> +Deprecated, see
> +.B Floating
> +
> +.TP 7
> +.BI "Option \*qFloating\*q  \*q" boolean \*q
> +When enabled, the input device is set up floating and does not
> +report events through any master device or control a cursor. The device is
> +only available to clients using the X Input Extension API. This option is
> +disabled by default.
> +The options
> +.B CorePointer,
> +.B CoreKeyboard,
> +.B AlwaysCore,
> +and
> +.B SendCoreEvents,
> +are the inverse of option
> +.B Floating
> +(i.e.
> +.B SendCoreEvents \*qon\*q
> +is equivalent to
> +.B Floating \*qoff\*q
> +).
> +
> +This option controls the startup behavior only, a device
>  may be reattached or set floating at runtime.
>  .PP
>  For pointing devices, the following options control how the pointer
> -- 
> 1.7.3.2
> 


More information about the xorg-devel mailing list