I found that with the 100ms interval, animation is not quite as smooth
as I want it to be, so decrease it to 50ms. CPU load is mostly affected
by the drawing operations, not by the polling, and those happen only
on pointer movement.
Current behavior is better but it still feels unnatural. This is mostly
because the eye balls are in the same x-y plane as the mouse pointer.
The attached patch calculates 3D angles of the eye sight as if the eye ball
was slightly behind the screen (at the moment the distance is hardcoded to
3x eyeball radius). Smaller z distance makes the eyeballs more independent,
larger - increases the (x-y) tracking distance (the eyes remain in their
center position longer).
If the plugin's size needs allow it, set plugin into "small" mode.
That alignment stuff in the panel multi-row mode seems to be buggy.
I tried to get it working as good as possible, but there are some weird,
unexpected things happening with some configurations.
Clean up formatting of this function and make the eye movement independent.
The actual change is subtracting GTK_WIDGET(widget)->allocation.x from nx
and GTK_WIDGET(widget)->allocation.y from ny.