Until we add double-buffering, any unnecessary redrawing causes
annoying blinking. Eliminating redraws from unknown keypresses fixes
at least some, (but likely not that many).
XNextEvent (dpy, &xev);
switch (xev.type) {
case KeyPress:
+ need_redraw = true;
keycode = xev.xkey.keycode;
if (keycode == quit_code ||
keycode == escape_code)
{
acre_get_x_axis_data_range (acre, &x_min, &x_max);
}
- need_redraw = 1;
+ else
+ {
+ need_redraw = false;
+ }
break;
case ConfigureNotify:
width = xev.xconfigure.width;