Changeset 50031f0
- Timestamp:
- Jun 1, 2010, 12:25:27 AM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- 402ed3d3
- Parents:
- 933aa7d
- git-author:
- David Benjamin <davidben@mit.edu> (06/01/10 00:13:40)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/01/10 00:25:27)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
popwin.c
rd106110 r50031f0 14 14 owl_window_set_size_cb(pw->border, owl_popwin_size_border, 0, 0); 15 15 owl_window_set_size_cb(pw->content, owl_popwin_size_content, 0, 0); 16 owl_window_ map(pw->border, 1);16 owl_window_show(pw->border, 1); 17 17 18 18 pw->active=1; -
window.c
r933aa7d r50031f0 11 11 int dirty : 1; 12 12 int dirty_subtree : 1; 13 int mapped: 1;13 int shown : 1; 14 14 int is_screen : 1; 15 15 /* window information */ … … 68 68 static owl_window *screen = NULL; 69 69 if (!screen) { 70 /* The screen is magical. It's ' mapped', but the only mean of it going70 /* The screen is magical. It's 'shown', but the only mean of it going 71 71 * invisible is if we're tore down curses (i.e. screen resize) */ 72 72 screen = _owl_window_new(NULL, g.lines, g.cols, 0, 0); 73 73 screen->is_screen = 1; 74 74 owl_window_set_size_cb(screen, _screen_calculate_size, &g, 0); 75 owl_window_ map(screen, 0);75 owl_window_show(screen, 0); 76 76 } 77 77 return screen; … … 273 273 static void _map_recurse_curry(owl_window *w) 274 274 { 275 owl_window_ map(w, 1);276 } 277 278 void owl_window_ map(owl_window *w, int recurse)279 { 280 w-> mapped= 1;275 owl_window_show(w, 1); 276 } 277 278 void owl_window_show(owl_window *w, int recurse) 279 { 280 w->shown = 1; 281 281 _owl_window_realize(w); 282 282 if (w->pan) … … 286 286 } 287 287 288 void owl_window_ unmap(owl_window *w)288 void owl_window_hide(owl_window *w) 289 289 { 290 290 /* you can't unmap the screen */ 291 291 if (w->is_screen) 292 292 return; 293 w-> mapped= 0;293 w->shown = 0; 294 294 if (w->pan) 295 295 hide_panel(w->pan); … … 297 297 } 298 298 299 int owl_window_is_ mapped(owl_window *w)300 { 301 return w-> mapped;299 int owl_window_is_shown(owl_window *w) 300 { 301 return w->shown; 302 302 } 303 303 … … 316 316 /* check if we can create a window */ 317 317 if ((w->parent && w->parent->win == NULL) 318 || !w-> mapped318 || !w->shown 319 319 || w->win != NULL) 320 320 return; … … 414 414 w->begin_y = begin_y; 415 415 w->begin_x = begin_x; 416 if (w-> mapped) {417 /* Window is mapped, we must try to have a window at the end */416 if (w->shown) { 417 /* Window is shown, we must try to have a window at the end */ 418 418 if (w->win) { 419 419 /* We actually do have a window; let's move it */ … … 453 453 w->nlines = nlines; 454 454 w->ncols = ncols; 455 /* window is mapped, we must try to have a window at the end */456 if (w-> mapped) {455 /* window is shown, we must try to have a window at the end */ 456 if (w->shown) { 457 457 /* resizing in ncurses is hard: give up do a unrealize/realize */ 458 458 _owl_window_unrealize(w); … … 460 460 /* recalculate children sizes BEFORE remapping, so that everything can resize */ 461 461 owl_window_children_foreach_onearg(w, owl_window_recompute_position); 462 if (w-> mapped) {462 if (w->shown) { 463 463 _owl_window_realize(w); 464 464 } -
window.h
rce7c6c3 r50031f0 19 19 owl_window *owl_window_get_parent(owl_window *w); 20 20 21 void owl_window_ map(owl_window *w, int recurse);22 void owl_window_ unmap(owl_window *w);23 int owl_window_is_ mapped(owl_window *w);21 void owl_window_show(owl_window *w, int recurse); 22 void owl_window_hide(owl_window *w); 23 int owl_window_is_shown(owl_window *w); 24 24 int owl_window_is_realized(owl_window *w); 25 25 int owl_window_is_toplevel(owl_window *w);
Note: See TracChangeset
for help on using the changeset viewer.