* Remove code that created the subwin if it did not exist as this is
not the correct behaviour. * Mods to support new curses window behaviour.
This commit is contained in:
parent
4aa1a8e86c
commit
64bd55957f
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: post.c,v 1.6 2001/01/22 01:05:34 blymn Exp $ */
|
/* $NetBSD: post.c,v 1.7 2001/03/25 12:34:47 blymn Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998-2000 Brett Lymn
|
* Copyright (c) 1998-2000 Brett Lymn
|
||||||
@ -40,7 +40,7 @@ post_form(FORM *form)
|
|||||||
{
|
{
|
||||||
int rows, cols, status;
|
int rows, cols, status;
|
||||||
|
|
||||||
if ((form == NULL) || (form->win == NULL))
|
if (form == NULL)
|
||||||
return E_BAD_ARGUMENT;
|
return E_BAD_ARGUMENT;
|
||||||
|
|
||||||
if (form->posted == 1)
|
if (form->posted == 1)
|
||||||
@ -55,19 +55,11 @@ post_form(FORM *form)
|
|||||||
if (scale_form(form, &rows, &cols) != E_OK)
|
if (scale_form(form, &rows, &cols) != E_OK)
|
||||||
return E_SYSTEM_ERROR;
|
return E_SYSTEM_ERROR;
|
||||||
|
|
||||||
if ((form->subwin != NULL) && ((rows > getmaxy(form->subwin))
|
if ((form->scrwin != NULL) && ((rows > getmaxy(form->scrwin))
|
||||||
|| (cols > getmaxx(form->subwin)))) {
|
|| (cols > getmaxx(form->scrwin)))) {
|
||||||
return E_NO_ROOM;
|
return E_NO_ROOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (form->subwin == NULL) {
|
|
||||||
form->subwin_created = 1;
|
|
||||||
form->subwin = derwin(form->win, rows, cols, 0, 0);
|
|
||||||
if (form->subwin == NULL)
|
|
||||||
return E_SYSTEM_ERROR;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (_formi_create_dbg_file() != E_OK)
|
if (_formi_create_dbg_file() != E_OK)
|
||||||
return E_SYSTEM_ERROR;
|
return E_SYSTEM_ERROR;
|
||||||
@ -115,11 +107,7 @@ unpost_form(FORM *form)
|
|||||||
form->form_term(form);
|
form->form_term(form);
|
||||||
form->in_init = 0;
|
form->in_init = 0;
|
||||||
|
|
||||||
wclear(form->subwin);
|
wclear(form->scrwin);
|
||||||
if (form->subwin_created == 1) {
|
|
||||||
delwin(form->subwin);
|
|
||||||
form->subwin_created = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
form->posted = 0;
|
form->posted = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user