Re: [PATCH] repaint other panel after Alt-O



On Tue, 9 Sep 2003, Pavel Roskin wrote:

> On Tue, 9 Sep 2003, Jindrich Makovicka wrote:
>
> > With current CVS, when a directory contains more files than fit on the
> > screen, and the cursor is on the files "below the bottom edge", Alt-O
> > selects this file in the other panel, but it still displays the entries
> > beginning with the first one. The attached patch fixes this issue by
> > explicitly redrawing the panel when do_select sets top_file to something
> > higher than zero.
>
> The real problem is that the "dirty" flag on panels is now ignored, which
> is obviously wrong.  The reason for this flag is to repaint the panel only
> once per event, and do it without the frame.

I have fixed the problem you reported by taking exactly the opposite
approach compared to what you were trying to do.  paint_panel() and
panel_update_contents() are static now to discourage their excessive use
where marking the panel dirty is enough.

screen.c is still a mess.  paint_dir(), repaint_file() and even
paint_panel() are still used outside the WIDGET_DRAW and DLG_POST_KEY
handlers.  However, the problem you described has been solved.

> I see that I was wrong when I removed make_panels_dirty().

It's now called update_dirty_panels() and resides in screen.c.  It's also
much simpler.

-- 
Regards,
Pavel Roskin



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]