[PATCH]: mtdev could be disabled at configuration
Marc Chalain
marc.chalain at gmail.com
Mon Jun 10 03:18:57 PDT 2013
Linux kernel uses a lot of function pointers. And I'm looking this solution.
2013/6/10 Pekka Paalanen <ppaalanen at gmail.com>
> On Mon, 10 Jun 2013 09:47:32 +0200
> Marc Chalain <marc.chalain at gmail.com> wrote:
>
> > Hi Pekka,
> > I agree with --disable-multitouch.
> > For the comparison between the use of ifdef and no-op functions. I think
> > the second solution is ambiguous, we disable the feature in one side and
> we
> > use the API in the other side.
> > I look if it's possible to have a third solution which satisfies every
> > body...
>
> In this case, the no-op functions would never be called, anyway.
>
> #ifdefs are harder to read than function calls, when functions are well
> named, and live up to their names. The linux kernel favours this, too.
>
>
> Cheers,
> pq
>
> > 2013/6/10 Pekka Paalanen <ppaalanen at gmail.com>
> >
> > > On Fri, 7 Jun 2013 12:11:14 +0200
> > > Marc Chalain <marc.chalain at gmail.com> wrote:
> > >
> > > > mtdev is not necessary on some device (desktop or set-top-box). For
> > > > embedded solution the minimum of dependencies is required.
> "configure"
> > > > accepts the --disable-mtdev option.
> > >
> > > Hi Marc,
> > >
> > > with this patch, if weston is compiled with --disable-mtdev, it looks
> > > like it will still happily open multitouch devices, expose them to
> > > Wayland clients, and feed them garbage or fail or whatever. Right?
> > >
> > > I think the proper approach is to change the configure option into
> > > --disable-multitouch or --disable-touchscreen, which would not only
> > > drop the dependency to mtdev, but also make Weston ignore all
> > > touchscreen devices since it will not be able to handle them.
> > >
> > > As the cherry on top, when a touchscreen device gets ignored during
> > > input device detection, it would be nice to print a log message saying
> > > it was ignored because touchscreen support was not built, instead of
> > > the usual log message.
> > >
> > > Also, there are not that many mtdev functions, so to minimize the
> > > number of #ifdefs is the code, you could define no-op functions for a
> > > few mtdev entry points when the real mtdev is not used.
> > >
> > >
> > > Thanks,
> > > pq
> > >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130610/26f2390f/attachment-0001.html>
More information about the wayland-devel
mailing list