[PATCH libinput] Change sendevents configuration to use bitmasks
Bill Spitzak
spitzak at gmail.com
Mon Nov 3 10:17:52 PST 2014
On 11/02/2014 09:53 PM, Peter Hutterer wrote:
> In the future, we should allow multiple sendevent modes set simultanously.
> Change the API to use a bitmask instead of a single return value.
> + /* DISABLED overrides any DISABLED_ON_ */
> + if ((mode & LIBINPUT_CONFIG_SEND_EVENTS_DISABLED) &&
> + (mode & LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE))
> + mode &= ~LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE;
Second test is not required, ie this works:
if (mode & LIBINPUT_CONFIG_SEND_EVENTS_DISABLED)
mode &= ~LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE;
More information about the wayland-devel
mailing list