X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=panel%2Fp_move.c;h=adae64583220edb80c886da437e92c04b195ddcc;hp=6bec36b91246ae9b6553963ee2b039fe2257f91a;hb=9da7d09296c1b625afd18567a6828d8e7ec2ee01;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/panel/p_move.c b/panel/p_move.c index 6bec36b9..adae6458 100644 --- a/panel/p_move.c +++ b/panel/p_move.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1995 * * and: Eric S. Raymond * + * and: Juergen Pfeifer 1997-1999,2009 * ****************************************************************************/ /* p_move.c @@ -36,24 +37,24 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_move.c,v 1.2 1998/02/11 12:14:01 tom Exp $") +MODULE_ID("$Id: p_move.c,v 1.11 2010/01/23 21:22:15 tom Exp $") -int -move_panel(PANEL *pan, int starty, int startx) +NCURSES_EXPORT(int) +move_panel(PANEL * pan, int starty, int startx) { - WINDOW *win; + int rc = ERR; - if(!pan) - return(ERR); - if(_nc_panel_is_linked(pan)) - _nc_override(pan,P_TOUCH); - win = pan->win; - if(mvwin(win,starty,startx)) - return(ERR); - getbegyx(win, pan->wstarty, pan->wstartx); - pan->wendy = pan->wstarty + getmaxy(win); - pan->wendx = pan->wstartx + getmaxx(win); - if(_nc_panel_is_linked(pan)) - _nc_calculate_obscure(); - return(OK); + T((T_CALLED("move_panel(%p,%d,%d)"), (void *)pan, starty, startx)); + + if (pan) + { + GetHook(pan); + if (IS_LINKED(pan)) + { + Touchpan(pan); + PANEL_UPDATE(pan, (PANEL *) 0); + } + rc = mvwin(pan->win, starty, startx); + } + returnCode(rc); }