mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
MB emulation timeout is stored as Time, make the property 32-bit too.
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
/* Middle mouse button emulation */
|
/* Middle mouse button emulation */
|
||||||
/* BOOL */
|
/* BOOL */
|
||||||
#define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation"
|
#define EVDEV_PROP_MIDBUTTON "Evdev Middle Button Emulation"
|
||||||
/* CARD16 */
|
/* CARD32 */
|
||||||
#define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout"
|
#define EVDEV_PROP_MIDBUTTON_TIMEOUT "Evdev Middle Button Timeout"
|
||||||
|
|
||||||
/* Wheel emulation */
|
/* Wheel emulation */
|
||||||
|
|||||||
@@ -358,11 +358,11 @@ EvdevMBEmuSetProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val,
|
|||||||
pEvdev->emulateMB.enabled = *((BOOL*)val->data);
|
pEvdev->emulateMB.enabled = *((BOOL*)val->data);
|
||||||
} else if (atom == prop_mbtimeout)
|
} else if (atom == prop_mbtimeout)
|
||||||
{
|
{
|
||||||
if (val->format != 16 || val->size != 1 || val->type != XA_INTEGER)
|
if (val->format != 32 || val->size != 1 || val->type != XA_INTEGER)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
|
||||||
if (!checkonly)
|
if (!checkonly)
|
||||||
pEvdev->emulateMB.timeout = *((INT16*)val->data);
|
pEvdev->emulateMB.timeout = *((CARD32*)val->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
@@ -393,7 +393,7 @@ EvdevMBEmuInitProperty(DeviceIntPtr dev)
|
|||||||
prop_mbtimeout = MakeAtom(EVDEV_PROP_MIDBUTTON_TIMEOUT,
|
prop_mbtimeout = MakeAtom(EVDEV_PROP_MIDBUTTON_TIMEOUT,
|
||||||
strlen(EVDEV_PROP_MIDBUTTON_TIMEOUT),
|
strlen(EVDEV_PROP_MIDBUTTON_TIMEOUT),
|
||||||
TRUE);
|
TRUE);
|
||||||
rc = XIChangeDeviceProperty(dev, prop_mbtimeout, XA_INTEGER, 16, PropModeReplace, 1,
|
rc = XIChangeDeviceProperty(dev, prop_mbtimeout, XA_INTEGER, 32, PropModeReplace, 1,
|
||||||
&pEvdev->emulateMB.timeout, FALSE);
|
&pEvdev->emulateMB.timeout, FALSE);
|
||||||
|
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
|
|||||||
Reference in New Issue
Block a user