lel

Fork of Hiltjo's Farbfeld image viewer. (It was just for fun, not much use)
Log | Files | Refs | README | LICENSE

commit 396870fd28aa3a8bf756768b8520bf0cdabc8c5c
parent 91ab93986209afac9be673cd51f627f306b93f9d
Author: Jacob R. Edwards <jacobouno@protonmail.com>
Date:   Sun, 18 Apr 2021 19:12:42 -0700

Only call update() in event handlers

This has very little effect on performence and is much simpler.

There is little reason to implicitly call update isn't any reason
Remove Ocall update()

Diffstat:
Mlel.c | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/lel.c b/lel.c @@ -384,7 +384,6 @@ setview(int mode) return; viewmode = mode; img.state &= ~(DRAWN | SCALED); - update(); } static void @@ -393,7 +392,6 @@ pan(int x, int y) img.view.panxoffset -= x; img.view.panyoffset -= y; img.state &= ~(DRAWN | SCALED); - update(); } static void @@ -409,7 +407,6 @@ inczoom(float f) return; img.view.zoomfact += f; img.state &= ~(DRAWN | SCALED); - update(); } static void @@ -419,7 +416,6 @@ zoom(float f) return; img.view.zoomfact = f; img.state &= ~(DRAWN | SCALED); - update(); } static void @@ -506,19 +502,17 @@ keypress(XEvent *ev) img.view.panxoffset = 0; img.view.panyoffset = 0; img.state &= ~(DRAWN | SCALED); - update(); break; case XK_n: nextimg(); img.state &= ~(DRAWN | SCALED); - update(); break; case XK_p: previmg(); img.state &= ~(DRAWN | SCALED); - update(); break; } + update(); } static void