diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-07-18 21:19:23 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-08-22 15:56:49 +1000 |
commit | 159b03e13760920274b573a2bccdbf6a79f059e7 (patch) | |
tree | 220ca056977c363cfe09c5190b9b59138ada18ce /os | |
parent | 95772598b57f6054fbf88683fa0a492c77605790 (diff) |
config: add udev/systemd multi-seat support
Add support for multi-seat-aware input device hotplugging. This
implements the multi-seat scheme explained here:
http://www.freedesktop.org/wiki/Software/systemd/multiseat
This introduces a new X server switch "-seat" which allows configuration
of the seat to enumerate hotplugging devices on. If specified the value
of this parameter will also be exported as root window property
Xorg_Seat.
To properly support input hotplugging devices need to be tagged in udev
according to the seat they are on. Untagged devices are assumed to be on
the default seat "seat0". If no "-seat" parameter is passed only devices
on "seat0" are used. This means that the new scheme is perfectly
compatible with existing setups which have no tagged input devices.
Note that the -seat switch takes a completely generic identifier, and
that it has no effect on non-Linux systems. In fact, on other OSes a
completely different identifier scheme for seats could be used but still
be exposed with the Xorg_Seat and -seat.
I tried to follow the coding style of the surrounding code blocks if
there was any one could follow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'os')
-rw-r--r-- | os/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/os/utils.c b/os/utils.c index 36cb46f11..e8ecb7193 100644 --- a/os/utils.c +++ b/os/utils.c @@ -201,6 +201,8 @@ Bool PanoramiXExtensionDisabledHack = FALSE; int auditTrailLevel = 1; +char *SeatId = NULL; + #if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #define HAS_SAVED_IDS_AND_SETEUID #endif @@ -511,6 +513,7 @@ void UseMsg(void) ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); ErrorF("-retro start with classic stipple and cursor\n"); ErrorF("-s # screen-saver timeout (minutes)\n"); + ErrorF("-seat string seat to run on\n"); ErrorF("-t # default pointer threshold (pixels/t)\n"); ErrorF("-terminate terminate at server reset\n"); ErrorF("-to # connection time out\n"); @@ -802,6 +805,13 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } + else if ( strcmp( argv[i], "-seat") == 0) + { + if(++i < argc) + SeatId = argv[i]; + else + UseMsg(); + } else if ( strcmp( argv[i], "-t") == 0) { if(++i < argc) |