Changeset 8ae2de9 for popwin.c


Ignore:
Timestamp:
Mar 2, 2010, 9:14:44 PM (15 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
b928b3a
Parents:
be1ae91
git-author:
David Benjamin <davidben@mit.edu> (10/30/09 14:31:56)
git-committer:
David Benjamin <davidben@mit.edu> (03/02/10 21:14:44)
Message:
Attach PANELs to all of our WINDOWs

We replace wnoutrefresh with update_panels (except in set cursor; there
we have to guarantee that the window is empty.). The viewwin does not
get a PANEL because it's weird and currently leeches onto someone else's
WINDOW.

Resizing is also rather fiddly because panel wants to know about window
resizes. Not completely sure I got it right yet. The only library I know
of that does something like with with ncurses (libgnt) and they
endwin/refresh to resize the screen.

Signed-off-by: David Benjamin <davidben@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • popwin.c

    r8240bce r8ae2de9  
    2525
    2626  pw->borderwin=newwin(pw->lines, pw->cols, startline, startcol);
     27  pw->borderpanel = new_panel(pw->borderwin);
    2728  pw->popwin=newwin(pw->lines-2, pw->cols-2, startline+1, startcol+1);
     29  pw->poppanel = new_panel(pw->popwin);
    2830  pw->needsfirstrefresh=1;
    2931 
     
    4850  }
    4951   
    50   wnoutrefresh(pw->popwin);
    51   wnoutrefresh(pw->borderwin);
     52  update_panels();
    5253  owl_global_set_needrefresh(&g);
    5354  pw->active=1;
     
    5758int owl_popwin_close(owl_popwin *pw)
    5859{
     60  del_panel(pw->poppanel);
     61  del_panel(pw->borderpanel);
    5962  delwin(pw->popwin);
    6063  delwin(pw->borderwin);
     
    7578int owl_popwin_refresh(const owl_popwin *pw)
    7679{
    77   touchwin(pw->borderwin);
    78   touchwin(pw->popwin);
    79 
    80   wnoutrefresh(pw->borderwin);
    81   wnoutrefresh(pw->popwin);
     80  update_panels();
    8281  owl_global_set_needrefresh(&g);
    8382  return(0);
Note: See TracChangeset for help on using the changeset viewer.