bug-ncurses
[Top][All Lists]
Advanced

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

wbkgd - little bit different behave in last ncurses (regression)


From: Pavel Stehule
Subject: wbkgd - little bit different behave in last ncurses (regression)
Date: Tue, 25 Feb 2020 10:06:58 +0100

Hi

I tested my ncurses-st-menu demo application and I was surprised so shadows around menu are displayed incorrectly.

In my code I try clean run

clear()
refresh()

and it was good enough for previous versions.

The shadow window is implemented in steps

1. werase(shadow_window)
2. overwrite(desktop_window, shadow_window)
3. I try to change attribute of chars inside shadow window

mvwin_wch(menu->shadow_window, i, j, &cch);
getcchar(&cch, wch, &attr, &cp, NULL);

setcchar(&cch, wch,
           shadow_attr | (attr & A_ALTCHARSET),
           config->menu_shadow_cpn, NULL);

mvwadd_wch(menu->shadow_window, i, j, &cch);

And this method doesn't work correctly on ncurses version: 6.1, patch: 20190803

Fedora Core 31

The fix is not hard - I had to run explicitly

wclear(stdsrc)

But if I understand correctly, then just clear should be enough?

Older working window preparing

wbkgd(stdscr, COLOR_PAIR(1));
wrefresh(stdscr);

Now (after fix)
wbkgd(stdscr, COLOR_PAIR(1));
wclear(stdscr);
wrefresh(stdscr);

Note

wbkgd(stdscr, COLOR_PAIR(1) | ' ')

It is not any problem to call wclear(stdscr) in my demo applications (In real applications, then the screen is filled by same content). I would to understand better to this regression, to write my applications correctly.

Regards

Pavel





Attachment: Snímek z 2020-02-25 09-00-38.png
Description: PNG image


reply via email to

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