po 2. 3. 2020 v 11:10 odesílatel Thomas Dickey <
address@hidden> napsal:
On Tue, Feb 25, 2020 at 10:06:58AM +0100, Pavel Stehule wrote:
> 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);
I took a look at this, compiling your examples against ncurses 6.2,
with the wclear commented-out, but don't see the breakage.
If you use master branch of ncurses-st-menu, then it was fixed by extra call of wclear by commit
so if you want to see this effect you should to checkout to afe09650ca5d691d90f89f35059bc5a8e3777f27 commit.
Or manually remove wclear
> Note
>
> wbkgd(stdscr, COLOR_PAIR(1) | ' ')
That should work. This might not (related to the other bug report):
wbkgd(stdscr, COLOR_PAIR(1))
--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net