bsddialog(3): fix disabled shadow
Fix dialogs building and updating fault with disabled shadow (conf.shadow=false and implicitly bsddialog --no-shadow). While here delete WARNS=2: all warnings were fixed in upstream and imported in 0.2. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D34958
This commit is contained in:
parent
7a60e798fb
commit
b9e5884ef7
|
@ -823,7 +823,7 @@ draw_dialog(struct bsddialog_conf *conf, WINDOW *shadow, WINDOW *widget,
|
||||||
|
|
||||||
getmaxyx(widget, h, w);
|
getmaxyx(widget, h, w);
|
||||||
|
|
||||||
if (shadow != NULL)
|
if (conf->shadow)
|
||||||
wnoutrefresh(shadow);
|
wnoutrefresh(shadow);
|
||||||
|
|
||||||
draw_borders(conf, widget, h, w, RAISED);
|
draw_borders(conf, widget, h, w, RAISED);
|
||||||
|
@ -883,7 +883,7 @@ update_dialog(struct bsddialog_conf *conf, WINDOW *shadow, WINDOW *widget,
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if (shadow != NULL) {
|
if (conf->shadow) {
|
||||||
wclear(shadow);
|
wclear(shadow);
|
||||||
mvwin(shadow, y + t.shadow.h, x + t.shadow.w);
|
mvwin(shadow, y + t.shadow.h, x + t.shadow.w);
|
||||||
wresize(shadow, h, w);
|
wresize(shadow, h, w);
|
||||||
|
@ -962,7 +962,7 @@ end_dialog(struct bsddialog_conf *conf, WINDOW *shadow, WINDOW *widget,
|
||||||
delwin(shadow);
|
delwin(shadow);
|
||||||
|
|
||||||
if (conf->clear)
|
if (conf->clear)
|
||||||
hide_widget(y, x, h, w, shadow != NULL);
|
hide_widget(y, x, h, w, conf->shadow);
|
||||||
|
|
||||||
if (conf->get_height != NULL)
|
if (conf->get_height != NULL)
|
||||||
*conf->get_height = h;
|
*conf->get_height = h;
|
||||||
|
|
|
@ -24,6 +24,4 @@ MAN= bsddialog.3
|
||||||
LIBADD= ncursesw tinfow formw
|
LIBADD= ncursesw tinfow formw
|
||||||
CFLAGS+= -D_XOPEN_SOURCE_EXTENDED
|
CFLAGS+= -D_XOPEN_SOURCE_EXTENDED
|
||||||
|
|
||||||
WARNS= 2
|
|
||||||
|
|
||||||
.include <bsd.lib.mk>
|
.include <bsd.lib.mk>
|
||||||
|
|
Loading…
Reference in New Issue