- Timestamp:
- Mar 2, 2010, 9:14:44 PM (15 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
global.c
r516c27e r8ae2de9 126 126 } 127 127 128 /* If *pan does not exist, we create a new panel, otherwise we replace the 129 window in *pan with win. 130 131 libpanel PANEL objects cannot exist without owner a valid window. This 132 maintains the invariant for _owl_global_setup_windows. */ 133 void _owl_panel_set_window(PANEL **pan, WINDOW *win) 134 { 135 WINDOW *oldwin; 136 if (*pan) { 137 oldwin = panel_window(*pan); 138 replace_panel(*pan, win); 139 delwin(oldwin); 140 } else { 141 *pan = new_panel(win); 142 } 143 } 144 128 145 void _owl_global_setup_windows(owl_global *g) { 129 146 int cols, typwin_lines; … … 142 159 143 160 /* create the new windows */ 144 g->recwin =newwin(g->recwinlines, cols, 0, 0);161 g->recwin = newwin(g->recwinlines, cols, 0, 0); 145 162 if (g->recwin==NULL) { 146 163 owl_function_debugmsg("_owl_global_setup_windows: newwin returned NULL\n"); … … 148 165 exit(50); 149 166 } 167 _owl_panel_set_window(&g->recpan, g->recwin); 150 168 151 g->sepwin=newwin(1, cols, g->recwinlines, 0); 152 g->msgwin=newwin(1, cols, g->recwinlines+1, 0); 153 g->typwin=newwin(typwin_lines, cols, g->recwinlines+2, 0); 169 g->sepwin = newwin(1, cols, g->recwinlines, 0); 170 _owl_panel_set_window(&g->seppan, g->sepwin); 171 g->msgwin = newwin(1, cols, g->recwinlines+1, 0); 172 _owl_panel_set_window(&g->msgpan, g->msgwin); 173 g->typwin = newwin(typwin_lines, cols, g->recwinlines+2, 0); 174 _owl_panel_set_window(&g->typpan, g->typwin); 154 175 155 176 owl_editwin_set_curswin(g->tw, g->typwin, typwin_lines, g->cols); … … 469 490 if (!g->resizepending) return; 470 491 471 /* delete the current windows */472 delwin(g->recwin);473 delwin(g->sepwin);474 delwin(g->msgwin);475 delwin(g->typwin);476 492 if (!isendwin()) { 477 493 endwin(); 478 494 } 479 480 refresh();481 495 482 496 /* get the new size */
Note: See TracChangeset
for help on using the changeset viewer.