diff options
author | Dylan Simon <dylan@dylex.net> | 2009-10-04 17:30:23 -0400 |
---|---|---|
committer | Sung-Jin Park <sj76.park@samsung.com> | 2013-09-02 23:38:01 -0400 |
commit | 8a57325cfafc016ab228775c0ea9df9b5ea49fdd (patch) | |
tree | 96ea4297bcf0960a40ec681b027db4712c2708ae | |
parent | 20dfa9fa4d7a8f4cdd5619dea02b0284c47216e8 (diff) | |
download | xeyes-8a57325cfafc016ab228775c0ea9df9b5ea49fdd.tar.gz xeyes-8a57325cfafc016ab228775c0ea9df9b5ea49fdd.tar.bz2 xeyes-8a57325cfafc016ab228775c0ea9df9b5ea49fdd.zip |
Fix excessive redraw bug
introduced by dbb8401026c421d64a2962e6ac6eb900f6dc141e
Change-Id: Icfc6073bdfed7dc5be857d5c7248bc8b5aec7d68
Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
-rw-r--r-- | Eyes.c | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -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); |