Conflict when several apps use the accelerometers?

Hendrik Siedelmann hendrik.siedelmann at googlemail.com
Wed Jan 14 19:12:46 CET 2009


2009/1/14 Olivier Migeot <larrycow at gmail.com>:
> On Wed, Jan 14, 2009 at 3:40 PM, VirtuAlex <virtualex at linuxoid.net> wrote:
>
>> Fully exclusive access is not a solution. It just defeats the purpose of
>> multitasking. Actually I think the window manager should dispatch
>> accelerator events, like it dispatches the mouse events. Only focused
>> application should receive them
>
> Well, unless we decide of a new kind of focus ("accel-focus" or
> something), this should be more flexible. For example, some background
> apps might want to get accel' data : auto-rotation tools (yeah I know,
> the whole point of managing accelerometers through the WM would be to
> bury this practice), HDD-parkers (yeah I know, there's not HDD in
> Neo's), ... Seriously, I can't get anything serious as an example, but
> I think you got my point.

Get higher gps accuracy using accelerometer data (or use it when driving
through a tunnel) would be a nice example.

> This apart, I'm all for the WM-based path. This should be a
> freedesktop standard or something, actually. Or has it more to do with
> Linux' input layer? Or Xorg's? I don't know...

I also don't know which is the best way to get the data to the apps, but we
shouldn't forget that different apps will need the data in different ways:
- as gestures (like keyboard events), this could also be events like
orientation changes
- raw data as often as possible or averaged over small time intervalls
(games, ...)
- preprocessed to give only orientation, or accelleration ...

A point agains the WM way would be that the data should be available over
network, so the FR could be used for example as a joystick. Also there might
be programs that want to use the data without being dependent of an WM-stack.

So perhaps a daemon wich communicates over dbus?
I'm actually thinking of writing one, I  want to use accellerometers in omview
and I want to do it the right way.
Needs to be fast though.

hendrik




More information about the community mailing list