Commit 4b6738c8 authored by Alan Coopersmith's avatar Alan Coopersmith

Set XI_PROP_DEVICE_NODE property to string from "Device" option

Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <>
Reviewed-by: default avatarAlexandr Shadchin <>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <>
parent 5583a77b
......@@ -113,8 +113,9 @@ protocol setting is platform-specific.
.BI "Option \*qDevice\*q \*q" string \*q
Specifies the device through which the mouse can be accessed. A common
setting is "/dev/mouse", which is often a symbolic link to the real
device. This option is mandatory, and there is no default setting. The server
device. This option is mandatory, and there is no default setting. The driver
may however attempt to probe some default devices if this option is missing.
Property: "Device Node" (read-only).
.TP 7
.BI "Option \*qButtons\*q \*q" integer \*q
Specifies the number of mouse buttons. In cases where the number of buttons
......@@ -62,6 +62,9 @@
#include "xf86Xinput.h"
#include "xf86_OSproc.h"
#include "exevents.h"
#include <X11/Xatom.h>
#include "xserver-properties.h"
#include "compiler.h"
......@@ -1019,6 +1022,25 @@ out:
return rc;
static void
MouseInitProperties(DeviceIntPtr device)
InputInfoPtr pInfo = device->public.devicePrivate;
const char *device_node =
xf86CheckStrOption(pInfo->options, "Device", NULL);
if (device_node)
Atom prop_device = MakeAtom(XI_PROP_DEVICE_NODE,
XIChangeDeviceProperty(device, prop_device, XA_STRING, 8,
strlen(device_node), device_node, FALSE);
#endif /* XI_PROP_DEVICE_NODE */
static void
MouseReadInput(InputInfoPtr pInfo)
......@@ -1616,6 +1638,7 @@ MouseProc(DeviceIntPtr device, int what)
ErrorF("assigning %p atom=%d name=%s\n", device, pInfo->atom,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment