summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Simon <dylan@dylex.net>2009-10-04 17:30:23 -0400
committerJames Cloos <cloos@jhcloos.com>2009-10-05 18:06:16 -0400
commit7cc3aa8ce30990e12e7b102f61dfcaaf8baa4d16 (patch)
tree96ea4297bcf0960a40ec681b027db4712c2708ae
parent6d9fdcfb076f4c261b071cc5c454c8b9ce560e68 (diff)
Fix excessive redraw bug
introduced by dbb8401026c421d64a2962e6ac6eb900f6dc141e Signed-off-by: Dylan Simon <dylan@dylex.net> Signed-off-by: James Cloos <cloos@jhcloos.com>
-rw-r--r--Eyes.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/Eyes.c b/Eyes.c
index 1bb36db..70905e8 100644
--- a/Eyes.c
+++ b/Eyes.c
@@ -137,7 +137,7 @@ static void Initialize (
* foreground - text, ticks black
* border - border black (foreground)
*
- * This doesn't completely work since the parent has already made up a
+ * This doesn't completely work since the parent has already made up a
* border. Sigh.
*/
if (w->eyes.reverse_video) {
@@ -367,9 +367,13 @@ static void draw_eye(EyesWidget w, TPoint mouse, int eye1, int eye2)
computePupils (mouse, newpupil);
xpupil.x = Xx(w->eyes.pupil[0].x, w->eyes.pupil[0].y, &w->eyes.t);
xpupil.y = Xy(w->eyes.pupil[0].x, w->eyes.pupil[0].y, &w->eyes.t);
- xpupil.x = Xx(newpupil[0].x, newpupil[0].y, &w->eyes.t);
- xpupil.y = Xy(newpupil[0].x, newpupil[0].y, &w->eyes.t);
- if (!XPointEqual (xpupil, xnewpupil)) {
+ xnewpupil.x = Xx(newpupil[0].x, newpupil[0].y, &w->eyes.t);
+ xnewpupil.y = Xy(newpupil[0].x, newpupil[0].y, &w->eyes.t);
+ if (
+#ifdef XRENDER
+ w->eyes.picture ? !TPointEqual(w->eyes.pupil[0], newpupil[0]) :
+#endif
+ !XPointEqual (xpupil, xnewpupil)) {
if (w->eyes.pupil[0].x != TPOINT_NONE ||
w->eyes.pupil[0].y != TPOINT_NONE)
eyeBall (w, FALSE, eye1);
@@ -383,12 +387,15 @@ static void draw_eye(EyesWidget w, TPoint mouse, int eye1, int eye2)
if (eye1 == eye2)
return;
- computePupils (mouse, newpupil);
xpupil.x = Xx(w->eyes.pupil[1].x, w->eyes.pupil[1].y, &w->eyes.t);
xpupil.y = Xy(w->eyes.pupil[1].x, w->eyes.pupil[1].y, &w->eyes.t);
- xpupil.x = Xx(newpupil[1].x, newpupil[1].y, &w->eyes.t);
- xpupil.y = Xy(newpupil[1].x, newpupil[1].y, &w->eyes.t);
- if (!XPointEqual (xpupil, xnewpupil)) {
+ xnewpupil.x = Xx(newpupil[1].x, newpupil[1].y, &w->eyes.t);
+ xnewpupil.y = Xy(newpupil[1].x, newpupil[1].y, &w->eyes.t);
+ if (
+#ifdef XRENDER
+ w->eyes.picture ? !TPointEqual(w->eyes.pupil[1], newpupil[1]) :
+#endif
+ !XPointEqual (xpupil, xnewpupil)) {
if (w->eyes.pupil[1].x != TPOINT_NONE ||
w->eyes.pupil[1].y != TPOINT_NONE)
eyeBall (w, FALSE, eye2);