Commit Graph

189 Commits

Author SHA1 Message Date
Povilas Kanapickas 2f53d1cf73 config: Fix platform busid parsing when there is no ID_PATH prop
On at least Lenovo Thinkpad E585 udev does not have ID_PATH property for
the drm node (see
https://gitlab.freedesktop.org/xorg/xserver/-/issues/993). While this is
likely udev bug, this causes the device to be not recognized as
attribs->busid is NULL, which causes platform_find_pci_info to be not
called and corresponding xf86_platform_devices[i]->pdev to be NULL.

At this moment pdev being NULL will cause a crash, but this is a
different bug.

Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993
Fixes: 0816e8fc linux: Make platform device probe less fragile
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-06-25 13:24:51 +03:00
Reza Arbab c0dcadad6c linux: Fix udev ID_PATH parsing for udl devices
The ID_PATH for a udl device looks like this:

  $ udevadm info /dev/dri/card2 | grep -w ID_PATH
  E: ID_PATH=pci-0000:00:14.0-usb-0:9.1:1.0

The parsing added in 0816e8fca6 ("linux: Make platform device probe
less fragile"), sets OdevAttributes::busid to "pci:0000:00:14.0", where
drmGetBusid() would have returned "3-9.1:1.0".

Identifying this as a "pci:*" device eventually causes the vendor/device
id check in probeSingleDevice() to fail, because a USB controller isn't
a supported device:

  $ udevadm info --path=/devices/pci0000:00/0000:00:14.0 | grep -e VENDOR -e ID_PCI_CLASS
  E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
  E: ID_VENDOR_FROM_DATABASE=Intel Corporation

Instead of parsing out "pci:0000:00:14.0" in this case, use
"usb:0:9.1:1.0" so the device probe will succeed.

Fixes: 0816e8fca6 ("linux: Make platform device probe less fragile")
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
2020-11-25 04:39:14 +00:00
Huacai Chen 9fbd3e43dd linux: Fix platform device probe for DT-based PCI
On a DT-base PCI platform, the sysfs path of vga device is like this:
/sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0.

Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and
the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This
is because config_udev_odev_setup_attribs() use strstr() to search the
first "pci-" in ID_PATH. To fix this, we implement a strrstr() function
and use it to search the last "pci-" in ID_PATH, which can get a correct
BusID.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
2020-07-28 16:14:55 +08:00
Martin Weber 429ee86ab9 udev: Fixed NULL pointer argument of strcmp
Signed-off-by: Martin Weber <martin.weber@secunet.com>
2019-09-20 05:33:47 +00:00
Adam Jackson 9acff30943 linux: Fix platform device PCI detection for complex bus topologies
Suppose you're in a Hyper-V guest and are trying to use PCI passthrough.
The ID_PATH that udev will construct for that looks something like
"acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in
the first four characters of that is going to not work.

Instead, strstr. I suppose it's possible you could have _multiple_ PCI
buses in the path, in which case you'd want strrstr, if that were a
thing.
2019-06-20 14:18:07 +00:00
Manoj Gupta 82f8cf8990 config/udev: Include header <sys/sysmacros.h> to use major/minor
glibc 2.25 has dropped sys/sysmacros.h from sys/types.h, so add
it explicitly in config/udev.c.

This is similar to the commit 84e3b96b53

Signed-off-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-11-14 10:26:48 -05:00
Adam Jackson 0816e8fca6 linux: Make platform device probe less fragile
At the point where xf86BusProbe runs we haven't yet taken our own VT,
which means we can't perform drm "master" operations on the device. This
is tragic, because we need master to fish the bus id string out of the
kernel, which we can only do after drmSetInterfaceVersion, which for
some reason stores that string on the device not the file handle and
thus needs master access.

Fortunately we know the format of the busid string, and it happens to
almost be the same as the ID_PATH variable from udev. Use that instead
and stop calling drmSetInterfaceVersion.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-10-18 13:52:11 -04:00
Adam Jackson d3e8af99dc meson: Fix install path for 10-quirks.conf
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-03-27 10:28:33 -04:00
Peter Hutterer a309323328 config: fix NULL value detection for ID_INPUT being unset
Erroneous condition caused us to keep going with all devices that didn't have
ID_INPUT set.

Fixes: 5aad81445c
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104382
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-01-08 14:48:04 -05:00
Peter Hutterer 5aad81445c config/udev: consider ID_INPUT_FOO=0 as 'unset'
Historically we didn't need to care about this case but more devices are
having invalid types set and they cannot be unset with a hwdb entry (which
doesn't handle the empty string). Allow for "0" to mean "unset" because
anything else would be crazy anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-11-01 09:54:08 +10:00
Eric Anholt 1549e30372 Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far.  The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet.  The unit tests are also not done.

The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools.  meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.

v2: Fix indentation nits, move version declaration to project(), use
    existing meson_options for version-config.h's vendor name/web.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 15:25:27 -07:00
Peter Hutterer d13cb97442 ddx: add new call to purge input devices that weren't added
Special case for the systemd-logind case in xfree86: when we're vt-switched
away and a device is plugged in, we get a paused fd from logind. Since we
can't probe the device or do anything with it, we store that device in the
xfree86 and handle it later when we vt-switch back. The device is not added to
inputInfo.devices until that time.

When the device is removed while still vt-switched away, the the config system
never notifies the DDX. It only runs through inputInfo.devices and our device
was never added to that.

When a device is plugged in, removed, and plugged in again while vt-switched
away, we have two entries in the xfree86-specific list that refer to the same
device node, both pending for addition later. On VT switch back, the first one
(the already removed one) will be added successfully, the second one (the
still plugged-in one) fails. Since the fd is correct, the device works until
it is removed again. The removed devices' config_info (i.e. the syspath)
doesn't match the actual device we addded tough (the input number increases
with each plug), it doesn't get removed, the fd remains open and we lose track
of the fd count. Plugging the device in again leads to a dead device.

Fix this by adding a call to notify the DDX to purge any remainders of devices
with the given config_info, that's the only identifiable bit we have at this
point.

https://bugs.freedesktop.org/show_bug.cgi?id=97928

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-10-26 15:35:07 +10:00
Keith Packard 3caf671ed2 config/dbus: Initialize dbus fd to -1 so teardown doesn't use fd 0
The dbus teardown code is called when the server fatal errors even if
that is before dbus has ever been initialized.  By statically
initializing the value of bus_info.fd, we avoid calling RemoveNotifyFd
on stdin.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-09-15 21:30:38 -07:00
Keith Packard bf2ca502b9 config: Hold input lock across udev socket handling
This avoids having the server running inside libudev from two threads
at once, which it appears to not like.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-08-16 17:33:59 +10:00
Keith Packard 6a5a4e6037 Remove SIGIO support for input [v5]
This removes all of the SIGIO handling support used for input
throughout the X server, preparing the way for using threads for input
handling instead.

Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
to stub functions input_lock/input_unlock so that we don't lose this
information.

xfree86 SIGIO support is reworked to use internal versions of
OsBlockSIGIO and OsReleaseSIGIO.

v2: Don't change locking order (Peter Hutterer)
v3: Comment weird && FALSE in xf86Helper.c
    Leave errno save/restore in xf86ReadInput
    Squash with stub adding patch (Peter Hutterer)
v4: Leave UseSIGIO config parameter so that
    existing config files don't break (Peter Hutterer)
v5: Split a couple of independent patch bits out
    of kinput.c (Peter Hutterer)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-05-26 16:07:54 -07:00
Peter Hutterer 2285fe78c0 xfree86: add support for MatchIsTabletPad
The tablet pads have been separate kernel devices for a while now and
libwacom has labelled them with the udev ID_INPUT_TABLET_PAD for over a year
now. Add a new MatchIsTabletPad directive to apply configuration options
specifically to the Pad part of a tablet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-05-03 16:15:51 +10:00
Laércio de Sousa daa6d2d58f config/udev: distinguish between real keyboards and other key devices
This patch introduces a new flag ATTR_KEY for hotplugged input devices,
so we can better distinguish between real keyboards (i.e. devices with
udev property ID_INPUT_KEYBOARD="1") and other key input devices like
lid switches, power buttons, etc.

All supported hotplug backends (udev, hal, and wscons) will set both
flags ATTR_KEY and ATTR_KEYBOARD for real keyboards, but udev backend
will set ATTR_KEY, but not ATTR_KEYBOARD, for non-keyboard key input
devices (hal and wscons will set both flags in any case). With this
distinction, kdrive input hotplugging mechanism will be allowed to only
grab real keyboards, as other key input devices are currently not
supported.

In order to don't break current behaviour, this patch will replace all
ATTR_KEYBOARD occurrences with ATTR_KEY in hw/xfree86/common/xf86Xinput.c.

[ajax: Just add ATTR_KEY, don't re-number the other attributes]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-03-01 10:46:48 -05:00
Keith Packard 8c8f3567fe config: Use NotifyFd interface for udev
This uses the NotifyFd interface to monitor the udev file descriptor
rather than adding another block/wakeup handler

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-12-01 13:55:15 -05:00
Keith Packard bf920b2390 config: Use NotifyFd for dbus interface
This uses the NotifyFd interface to monitor the dbus socket rather
than a block/wakeup handler.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-12-01 13:55:13 -05:00
Peter Hutterer fc59c8fe8d config: remove 10-evdev.conf, let the evdev driver install that file
Now that we have two likely drivers that fight for control over the input
devices (evdev and libinput) let's move the respective driver assignment to
each package. So you get what you install.

https://bugs.freedesktop.org/show_bug.cgi?id=89023

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-18 13:41:09 +10:00
Alan Coopersmith b96dc99996 Add XNFcallocarray() to allow xnfcalloc() to check for overflow
The xnfcalloc() macro took two arguments but simply multiplied them
together without checking for overflow and defeating any overflow
checking that calloc() might have done.  Let's not do that.

The original XNFcalloc() function is left for now to preserve driver
ABI, but is marked as deprecated so it can be removed in a future round
of ABI break/cleanup.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:07 -07:00
Dave Airlie 697b696e5e config/udev: Respect seat assignments when assigned devices
Jonathan Dieter posted a few patches to do this inside the Xorg
server but it makes no sense to do it there, just have the code
we use to probe the device list at startup check seat assignments
using the same code we check at hotplug time.

Bugilla: https://bugzilla.redhat.com/show_bug.cgi?id=1183654
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Jonathan Dieter <jdieter@lesbg.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-01-30 14:09:24 +01:00
Daniel Martin 62a4eeaa25 config/udev: Prefix and shift "removing GPU" message
The message "removing GPU device ..." appeared even if the removal was
skipped (when path == NULL). Move it below the path check and make it a
LogMessage with config/udev prefix.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-12-08 15:49:22 -08:00
Keith Packard 60c05ce1ab config: Replace OdevAttributes linked list with struct
OdevAttributes are a fixed set of values with known types; instead of
storing them in a linked list and requiring accessor/settor functions,
replace the list header, struct OdevAttributes, with a struct that
directly contains the values. This provides for compile-time
typechecking of the values, eliminates a significant amount of code
and generally simplifies using this datatype.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-17 17:10:48 -07:00
Hans de Goede 4dbb641bb2 config_odev_add_attribute*: Check for right attribute type
Don't allow setting string attributes to integers and vice versa.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-14 13:21:30 -07:00
Peter Hutterer d5587cf3ac config: revert quirk for the Evoluent Vertical Mouse
This quick makes the mouse behaviour more obvious (LMR buttons generate LMR
events) but goes against the manufacturer's intended defaults:

    Top button - left click.
    Wheel button - .middle click (e.g., for pan and rotate in CAD programs).
    Middle button - right click.
    Bottom button - back.
    Thumb button - forward.

from http://www.evoluent.com/vm3.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-15 12:56:54 +10:00
Keith Packard d60724b752 Merge commit 'who/for-keith'
Skipping two unreviewed patches; will mark them reviewed and cherry pick
2014-05-08 12:58:41 -07:00
Peter Hutterer 15460eaed2 systemd-logind: let the logind code decided whether to close an fd
We can only request one fd per device from systemd-logind. If a fd is re-used
by the same device, releasing the fd from one device doesn't mean we can close
it. The systemd code knows when it's really released, so let it close the fd.

Test case: xorg.conf section for an input device with hotplugging enabled.
evdev detects the duplicate and closes the hotplugged device, which closes the
fd. The other instance of evdev thinks the fd is still valid so now you're
playing a double lottery. First, which client(s) will get the evdev fd?
Second, which requests will be picked up by evdev and which ones will be
picked up by the client? You'll never know, but the fun is in finding out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-05-05 07:26:33 +10:00
Ray Strode bcb17b9987 dbus: don't dispatch dbus events on select() EINTR
wakeup handlers are called even when select() returns EINTR,
and when they're called the passed fd set is undefined.

This commit fixes the dbus wakeup handler to avoid dispatching
into dbus spuriously.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ray Strode <rstrode@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-30 08:56:32 -07:00
Hans de Goede 40e3c79a59 Remove config_odev_add_*attribute checks in various places
Note that there are more callers but those were already not doing any
error checking.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12 08:50:05 +01:00
Hans de Goede 92ff79f1a8 config_odev*: Use XNF alloc functions
config_odev* functions are called in code-paths were we already use
XNF* functions in other places, so which are not oom safe already.

Besides that oom is something which should simply never happen, so aborting
when it does is as good a response as any other.

While switching to XNF functions also fixup an unchecked strdup case.

Note the function prototypes are kept unchanged, as they are part of the
server ABI.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-12 08:50:05 +01:00
Keith Packard 81a4952d3d Merge remote-tracking branch 'whot/for-keith' 2014-03-11 22:04:36 -07:00
Peter Hutterer 795066477e config: search for PnPID on all parents (#75513)
The PnPID for a device may not be on the immediate parent, so search up the
device tree until we find one.

X.Org Bug 75513 <http://bugs.freedesktop.org/show_bug.cgi?id=75513>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2014-03-12 07:43:16 +10:00
Peter Hutterer 4754af9ddb config: only free odev->attrib_name for string types
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-03-11 17:43:24 +10:00
Hans de Goede c6dea929a4 config_odev_add*_attribute: Don't add the attribute to the list twice
Don't do the xorg_list_append a 2nd time when updating existing attributes,
while at it add a helper function for this to avoid code duplication.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-10 09:07:24 +01:00
Hans de Goede d9a4059d40 config-udev: Don't try to add drm devices twice
Before this commit we were trying to add most drm devices twice, once
from xf86platformProbe() and once from config_udev_init().

This results in somewhat confusing messages in Xorg.log, ie:

(II) xfree86: Adding drm device (/dev/dri/card0)
Later followed by:
(II) config/udev: Adding drm device (/dev/dri/card0)

By filtering out duplicate drm devices we avoid these confusing messages.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 08:13:55 +01:00
Hans de Goede cac3921989 systemd-logind: Hookup systemd-logind integration
This commits makes the changes necessary outside of the systemd-logind core
to make the server use systemd-logind managed fds for input devices and drm
nodes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 08:13:55 +01:00
Hans de Goede bc9d17fb56 OdevAttribute: Add support for integer attributes
Add a couple of new functions for dealing with storing integer values into
OdevAttributes.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 08:13:55 +01:00
Hans de Goede 350559dcdc OdevAttribute: config_odev_add_attribute: replace existing values
If an attribute already exists replace its value rather than adding a
duplicate attribute with the new value to the list.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 08:13:55 +01:00
Hans de Goede 10c64e8056 OdevAttribute: Add config_odev_get_attribute helper
Add a config_odev_get_attribute helper, and replace the diy looping over all
the attributes done in various places with calls to this helper.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 08:13:55 +01:00
Laércio de Sousa 9368bdec1d Get rid of config/non-seat0.conf.multi-seat
This file is deprecated by commits c73c36b53 and 46cf2a6093.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-17 08:44:33 +10:00
Gaetan Nadon 783991b1be config: fails to create tarball as xorg-server.conf file removed
Just need to update EXTRA_DIST

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-02-13 15:03:56 -08:00
Peter Hutterer ce3df579e3 input: un-constify InputAttributes
Introduced in fecc7eb1cf and reverts most of
that but it's helpfully mixed with other stuff.

InputAttributes are not const, they're strdup'd everywhere but the test code
and freed properly. Revert the const char changes and fix the test up instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-02-04 11:27:48 +10:00
Hans de Goede 33cec8af55 dbus-core: Attempt to connect to dbus ASAP
For systemd-logind integration we need the dbus connection to be available
before enumerating input and gfx devices.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29 15:29:00 -08:00
Hans de Goede 480590b90c dbus-core: Make dbus-core no longer mutually exclusive with udev
With systemd-logind the dbus-core will be used for more then just config, so
it should be possible to build it even when using a non dbus dependent config
backend.

This patch also removes the config_ prefix from the dbus-core symbols.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29 15:28:58 -08:00
Peter Hutterer c29454ae9d config: drop the dbus API
This API has been disabled by default since 1.4, the first release it came in.
There a no known users of it and even its direct replacement (HAL) has
been superseeded by udev on supported platforms since 1.8.

This code is untested, probably hasn't been compiled in years and should not
be shipped.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2014-01-29 15:28:57 -08:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Keith Packard 86647e7279 config/udev: handle const strings
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Laércio de Sousa c73c36b537 xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478)
This patch contributes to fill the remaining gaps which make
systemd-multi-seat-x wrapper still necessary in some multiseat setups.

This also replaces previous evdev patch that does the same thing
for that particular driver.

When option "-seat" is passed with an argument different from "seat0",
option "GrabDevice" for input devices is enabled by default
(no need of enabling it in xorg.conf's "InputClass" section).

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69478

Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-25 03:52:54 +10:00
Peter Hutterer 24cbb47ca8 config: provide example configuration for multi-seat setups
Seats other than seat0 need custom configuration. Provide that with a
default configuration file so we can share it across distros.

This file intentionally does not end in .conf so it won't get picked up by
the server after a normal installation. gdm, or whatever starts up the
servers will have to explicitly specifiy this config file.

This file replaces the one currently written by systemd's multi-seat-x
binary:
http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c

CC: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2013-07-17 14:27:26 +10:00