lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev ^L in popup corrupts screen (w/ ncurses)


From: Klaus Weide
Subject: lynx-dev ^L in popup corrupts screen (w/ ncurses)
Date: Fri, 29 Oct 1999 17:17:45 -0500 (CDT)

Do others see this too, with ncurses?

I hadn't compiled with ncurses (but without color-style) for quite a
while, now I see some problems that may not be new.  I didn't see the
below with recent versions compiled with either slang or color-style.

In a popup (either in a form or in old-style options screen) press ^L,
the popup becomes invisible except for the current line (but it is
still active, one can go up/down with arrow keys and text becomes
visible again).  Invisible == the main window ("under" the popup)
gets displayed where the popup should be.  In addition, all attributes
in the main window are lost (revert to default).

This effect goes away when I comment out the bkgd() call from
lynx_force_repaint().  Actually I have never understood what
that one is good for; it seems to cause more harm than good...
Also the problems some people had reported a while ago (one with
CJK, the other with UTF-8), that had to do with lynx_force_repaint()
ad the end of display_page(), may have been caused by the bkgd().


According to the ncurses bkgd man page,

              The rendition of every character on the  screen  is
              changed to the new background rendition.

(in addition to other effects).  That is definitely not what we
want from those calls.  It might make sense when the screen and
window is empty (erase() or similar has just been called), but even
then the erase() should already have set the background color on all
the screen.  man erase:

       Blanks created by erasure have the current background ren-
       dition (as set by wbkgdset) merged into them.

When lynx_force_repaint() is called with something on the screen
(or is that window), we don't want attribute corruption of the
existing characters.  Or we are gonna call erase or clear
after the lynx_force_repaint but before a refresh, but them
the bkgd would also be unnecessary.  IOW I don't see at all
why bkgdset isn't enough.  Perhaps one exception is when
the background color is acutally changed by the user, say
by switching color <-> mono or by reloading lynx.cfg.

Either popup_options() and popup_choice() should not call
lynx_force_repaint(); or lynx_force_repaint() should not call
bkgd(); or perhaps (in the popup case) there should be a
wbkgd() applied to the subwindow.

The ncurses is a 5.0-beta1 from around 990410 (slightly modified,
but nothing that should have to do with this).  Have there been
relevant changes since then?

TERM is "linux" console, with the terminfo description that
came with that ncurses, also tried soem older ones.  Effect
exists in mono (-nocolor) and color.  Lynx is compiled
with default-colors, I tried various color settings (generally
with light background) and the effect was always there;
one set just for reference (others are default; it's not supposed
be nice...)
COLOR:0:black:white
COLOR:1:blue:white
COLOR:4:magenta:green
COLOR:5:white:cyan
COLOR:6:lightgray:red

Tom, is that enough that you can reproduce it?

Btw, this does not seem to be realted to my recent changes
w.r.t (re)pinting of text and links.  For one thing it also
happens in old-style options menu which is not affected by
those changes.

    Klaus


reply via email to

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