diff options
Diffstat (limited to 'lib/libpanel/p_hide.c')
-rw-r--r-- | lib/libpanel/p_hide.c | 60 |
1 files changed, 9 insertions, 51 deletions
diff --git a/lib/libpanel/p_hide.c b/lib/libpanel/p_hide.c index 9ba369d1b15..d3cd6cab7cb 100644 --- a/lib/libpanel/p_hide.c +++ b/lib/libpanel/p_hide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_hide.c,v 1.2 1998/07/24 17:08:11 millert Exp $ */ +/* $OpenBSD: p_hide.c,v 1.3 1999/11/28 17:49:19 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -38,64 +38,22 @@ */ #include "panel.priv.h" -MODULE_ID("$From: p_hide.c,v 1.2 1998/02/11 12:14:01 tom Exp $") - -/*+------------------------------------------------------------------------- - __panel_unlink(pan) - unlink panel from stack ---------------------------------------------------------------------------*/ -static void -__panel_unlink(PANEL *pan) -{ - PANEL *prev; - PANEL *next; - -#ifdef TRACE - dStack("<u%d>",1,pan); - if(!_nc_panel_is_linked(pan)) - return; -#endif - - _nc_override(pan,P_TOUCH); - _nc_free_obscure(pan); - - prev = pan->below; - next = pan->above; - - if(prev) - { /* if non-zero, we will not update the list head */ - prev->above = next; - if(next) - next->below = prev; - } - else if(next) - next->below = prev; - if(pan == _nc_bottom_panel) - _nc_bottom_panel = next; - if(pan == _nc_top_panel) - _nc_top_panel = prev; - - _nc_calculate_obscure(); - - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - dStack("<u%d>",9,pan); -} +MODULE_ID("$From: p_hide.c,v 1.5 1999/11/25 13:49:26 juergen Exp $") int hide_panel(register PANEL *pan) { + int err = OK; + if(!pan) return(ERR); dBug(("--> hide_panel %s", USER_PTR(pan->user))); + dStack("<u%d>",1,pan); + + HIDE_PANEL(pan,err,TRUE); - if(!_nc_panel_is_linked(pan)) - { - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - return(ERR); - } + dStack("<u%d>",9,pan); - __panel_unlink(pan); - return(OK); + return(err); } |