Fix previous commit (independent eye movement).

Last time I got the brackets wrong, so the eyes did not look exactly
in the right direction.
This commit is contained in:
Harald Judt 2013-02-28 17:05:09 +01:00
parent c5f5e0484d
commit 8164b087d1

View file

@ -75,12 +75,10 @@ calculate_pupil_xy (EyesPlugin *eyes_applet,
height = GTK_WIDGET(widget)->allocation.height;
gtk_misc_get_alignment(GTK_MISC(widget), &xalign, &yalign);
nx = x - (MAX(width - eyes_applet->eye_width, 0)
* xalign - eyes_applet->eye_width / 2)
- GTK_WIDGET(widget)->allocation.x;
ny = y - (MAX(height - eyes_applet->eye_height, 0)
* yalign - eyes_applet->eye_height / 2)
- GTK_WIDGET(widget)->allocation.y;
nx = x - MAX(width - eyes_applet->eye_width, 0) * xalign
- eyes_applet->eye_width / 2 - GTK_WIDGET(widget)->allocation.x;
ny = y - MAX(height - eyes_applet->eye_height, 0) * yalign
- eyes_applet->eye_height / 2 - GTK_WIDGET(widget)->allocation.y;
h = hypot (nx, ny);
if (h < 0.5 ||