Commit 21caa79f authored by Jeremy Harris's avatar Jeremy Harris

Avoid losing partial-offwindow lines

parent 29006ca1
......@@ -1882,36 +1882,24 @@ plot_and_check(plotter * pl, command * cmd, Display * dpy, Display * dpy2)
#define DECIMATE (1<<5)
/* Return true if we finished the list, false if we were interrupted.
Also, update the first/final mapped pointers for the given clist if requested.
*/
static bool
plot_decimate(plotter * pl, command * clist, command * stop,
Display * dpy, Display * dpy2, bool update, unsigned decimate_level)
Display * dpy, Display * dpy2, unsigned decimate_level)
{
command * c = clist, * final = NULL;
command * c = clist;
unsigned d_factor, decimator;
for (d_factor = 1; decimate_level; decimate_level--) d_factor *= DECIMATE;
if (update) /* find/update the first-mapped point */
{
for (; c && c != stop; c = c->next) if (c->mapped) break;
pl->first_mapped_plain[pl->viewno] = c;
}
for (decimator = 0;
c && c != stop;
c = c->next, decimator++, decimator &= ~d_factor)
if (c->mapped)
{
if (decimator == 0 && c->needs_redraw)
if (!plot_and_check(pl, c, dpy, dpy2)) return FALSE;
final = c;
}
if (decimator == 0 && c->needs_redraw)
if (!plot_and_check(pl, c, dpy, dpy2)) return FALSE;
if (update)
pl->final_mapped_plain[pl->viewno] = final;
return TRUE;
}
......@@ -2309,24 +2297,24 @@ main(int argc, char *argv[])
for (ALLPLOTTERS) if (cont && pl->win != 0)
if (pl->visibility != VisibilityFullyObscured && !pl->clean)
if ( !plot_decimate(pl, pl->decoration_cmds, NULL, dpy, dpy2, FALSE, 0)
|| !plot_decimate(pl, pl->label_cmds, NULL, dpy, dpy2, FALSE, 0)
if ( !plot_decimate(pl, pl->decoration_cmds, NULL, dpy, dpy2, 0)
|| !plot_decimate(pl, pl->label_cmds, NULL, dpy, dpy2, 0)
|| !plot_decimate(pl, pl->first_mapped_plain[pl->viewno],
pl->final_mapped_plain[pl->viewno], dpy, dpy2, TRUE, 2)
pl->final_mapped_plain[pl->viewno], dpy, dpy2, 2)
)
cont = FALSE;
for (ALLPLOTTERS) if (cont && pl->win != 0)
if (pl->visibility != VisibilityFullyObscured && !pl->clean)
if ( !plot_decimate(pl, pl->first_mapped_plain[pl->viewno],
pl->final_mapped_plain[pl->viewno], dpy, dpy2, FALSE, 1)
pl->final_mapped_plain[pl->viewno], dpy, dpy2, 1)
)
cont = FALSE;
for (ALLPLOTTERS) if (cont && pl->win != 0)
if (pl->visibility != VisibilityFullyObscured && !pl->clean)
if ( !plot_decimate(pl, pl->first_mapped_plain[pl->viewno],
pl->final_mapped_plain[pl->viewno], dpy, dpy2, FALSE, 0)
pl->final_mapped_plain[pl->viewno], dpy, dpy2, 0)
)
cont = FALSE;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment