bug-ncurses
[Top][All Lists]
Advanced

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

Re: Solved Re: ncurses6.2 in Ubuntu 20.04 - typing not visible


From: Tjareson
Subject: Re: Solved Re: ncurses6.2 in Ubuntu 20.04 - typing not visible
Date: Wed, 13 Jan 2021 11:36:16 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

without seeing your source code, there's nothing to analyze.

subwindow limits haven't changed in quite a while - see attached.
There is actually not much I had to change in the code, except the
coordinates/size in sub_win to quick fix the issue.

[... some previous code to initialize variables etc...]

    msg_win = newwin(8,55,6,10);
[... some operations to create and process message text... ]

            msgform = new_form(msgfield);
            set_form_win(msgform,msg_win);
//          sub_win=subwin(msg_win, 8, 55, 11, 14);  <--- returned null
            sub_win=subwin(msg_win, 8, 55, 6, 10);   <--- corrected
version works also with ncurses 6.2
            set_form_sub(msgform,sub_win);
            post_form(msgform);
            keypad(msg_win,true);
            set_field_fore(current_field(msgform),
COLOR_PAIR(7)+col_attr[7]);
            if (msgcode.find("gen") != 0)
            {
                mvwaddstr(msg_win,1,2,"Info-ID:");
mvwaddstr(msg_win,1,12,getlistitem(msgcode,"&",1).c_str());
            }

[... more form init/operating code...]

The code missed to check if subwin returns null of course, so it was
never noticed that there is an issue with the coordinates of the sub
window. Strangely that worked with ncurses 5.x and I've only noticed in
6.2 there there is actually an error in the code. Right now I can't say
if version 5.x was dealing different with what sub_win will return or if
set_form_sub or anything afterwards has changed.

But as mentioned, it works all fine now.


On 13.01.21 00:19, Thomas Dickey wrote:
On Tue, Jan 12, 2021 at 11:49:11PM +0100, Tjareson wrote:
Hello,

I found the error causing the issue.

Somehow subwin returned a null value, as coordinates were outside the
main window.
For some reason this didn't happen in ncurses versions before 6.2, as
this failure in my source code never cause a problem until ncurses 6.2.
without seeing your source code, there's nothing to analyze.

subwindow limits haven't changed in quite a while - see attached.
I've corrected that and now it works.

Were there more rigid checks implemented related to parameters of subwin?

Anyways, it is solved. :-)

Tjareson


On 12.01.21 11:20, Tjareson wrote:
Hi Stian,

I've tried export TERM=gnome-256color, but the behavior is exactly the
same.

Also if I use xterm instead of the gnome terminal I have the same issues.

The curses.h in /usr/include shows version 6.2, so this seem to match
as well the installed libraries.

Tjareson


On 12.01.21 10:37, Stian Skjelstad wrote:
Hi Tjareson

Have you tried setting TERM to gnome-terminal instead of xterm?

Have you tested with other terminals?



Stian


On Tue, 12 Jan 2021, 10:30 Tjareson, <tjareson@gmx.de
<mailto:tjareson@gmx.de>> wrote

     echo $TERM shows:
     xterm-256color

     Other applications like htop, mc etc. are running without any issues.

     It looks like as it doesn't recognized the right terminal type or
     something like this. But then, why are apps like vi working w/o any
     issues in the same terminal?




reply via email to

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