[Top][All Lists]

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

Re: LYNX-DEV scrollok and lynx_force_repaint

From: Klaus Weide
Subject: Re: LYNX-DEV scrollok and lynx_force_repaint
Date: Wed, 5 Nov 1997 12:13:32 -0600 (CST)

On Tue, 4 Nov 1997, John E. Davis wrote:

> I finally upgraded from ac-24 to the latest development version today.
> Unfortunately, I was disappointed to see that the screen needlessly
> gets repainted.  For example, connect to
> and change from a web search to a
> usenet search.  When the box disappears, the screen will repaint
> itself.  
> This stems from a call to `scrollok'.  The man page for this says:
                             ^^^^^^^^(should be clearok)
>      With the clearok() routine, if enabled  (bf  is  TRUE),  the
>      next  call  to  wrefresh()  with  this window will clear the
>      screen completely and redraw the entire screen from scratch.
>      This  is  useful  when the contents of the screen are uncer-
>      tain, or in some cases for a more  pleasing  visual  effect.
>      If  the  win  argument  to  clearok() is the global variable
>      curscr(), the next call to wrefresh() with any window causes
>      the screen to be cleared and repainted from scratch.
> I can see no reason for the contents of the screen to be uncertain---
> only the user can can make that judgement.  I can also assure you that
> from what I have seen, the visual effect is far from pleasing.
> So, what is the purpose of the function lynx_force_repaint (which
> calls scrollok)?  In my opinion, it should be called only when the
> user presses Ctrl-R or Ctrl-L.

Are you sure that a call to lynx_force_repaint() causes this?  Which one?

It seems to me that it is not a call to lynx_force_repaint() which causes
the redraw, but the clear() in the following section of LYMainLoop.c:

         *  Refresh the screen if neccessary.
        if (refresh_screen) {
            HText_pageDisplay(Newline, prev_target);

and HText_pageDisplay() calls refresh() at the end. 
For USE_SLANG (I assume that is what you are talking about?), clear()
is really 

    SLsmg_gotorc (0, 0);
    SLsmg_erase_eos ();

Do those two SLsmg calls imply a clearok or an immediate screen update?


The last time I tried to change this (after you brought it up, I think),
I wasn't very successful.  See entries of 1997-05-20,
1997-05-26, 1997-05-29.  Basically I completeley eliminated the redrawing
(I didn't know what I was doing :) ) and Fote fixed it up.  Now at least
the redrawing doesn't happen when the selected option hasn't changed AND
slang or VMS is used...

I think I understand better now why redrawing was necessary when then
selected option has changed.  It is not really curses or slang related,
but HText_pageDisplay had to be called to updated an internal structure.
That could probably done in a different way, without calling clear().

But in the 1997-05-29 entry Fote wrote
                                           However, with Unix curses,
  the delwin() - refresh() sequence does not restore what was there
  before the popup was invoked, and none of the tweaks I tried got that
  to work, [...]

so the full redraw would still be necessary for curses.  Maybe not for


; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]