Changeset 46e2e56
- Timestamp:
- Jun 1, 2010, 12:25:27 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- fe49685
- Parents:
- 7cbef8c
- git-author:
- David Benjamin <davidben@mit.edu> (05/31/10 20:04:05)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/01/10 00:25:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
window.c
r7cbef8c r46e2e56 40 40 static void _owl_window_destroy_curses(owl_window *w); 41 41 42 static void _owl_window_ map_internal(owl_window *w);43 static void _owl_window_un map_internal(owl_window *w);42 static void _owl_window_realize(owl_window *w); 43 static void _owl_window_unrealize(owl_window *w); 44 44 45 45 /** singletons **/ … … 184 184 { 185 185 /* make sure the window is unmapped first */ 186 _owl_window_un map_internal(w);186 _owl_window_unrealize(w); 187 187 /* unlink parent/child information */ 188 188 if (w->parent) { … … 278 278 { 279 279 w->mapped = 1; 280 _owl_window_ map_internal(w);280 _owl_window_realize(w); 281 281 if (w->pan) 282 282 show_panel(w->pan); … … 293 293 if (w->pan) 294 294 hide_panel(w->pan); 295 _owl_window_un map_internal(w);295 _owl_window_unrealize(w); 296 296 } 297 297 … … 311 311 } 312 312 313 static void _owl_window_ map_internal(owl_window *w)313 static void _owl_window_realize(owl_window *w) 314 314 { 315 315 /* check if we can create a window */ … … 323 323 /* map the children, unless we failed */ 324 324 if (w->win) 325 owl_window_children_foreach_onearg(w, _owl_window_ map_internal);326 } 327 328 static void _owl_window_un map_internal(owl_window *w)325 owl_window_children_foreach_onearg(w, _owl_window_realize); 326 } 327 328 static void _owl_window_unrealize(owl_window *w) 329 329 { 330 330 if (w->win == NULL) 331 331 return; 332 332 /* unmap all the children */ 333 owl_window_children_foreach_onearg(w, _owl_window_un map_internal);333 owl_window_children_foreach_onearg(w, _owl_window_unrealize); 334 334 _owl_window_destroy_curses(w); 335 335 /* subwins leave a mess in the parent; dirty it */ … … 429 429 } 430 430 /* We don't have a window or failed to move it. Fine. Brute force. */ 431 _owl_window_un map_internal(w);432 _owl_window_ map_internal(w);431 _owl_window_unrealize(w); 432 _owl_window_realize(w); 433 433 } 434 434 } … … 453 453 /* window is mapped, we must try to have a window at the end */ 454 454 if (w->mapped) { 455 /* resizing in ncurses is hard: give up do a un map/map*/456 _owl_window_un map_internal(w);455 /* resizing in ncurses is hard: give up do a unrealize/realize */ 456 _owl_window_unrealize(w); 457 457 } 458 458 /* recalculate children sizes BEFORE remapping, so that everything can resize */ 459 459 owl_window_children_foreach_onearg(w, owl_window_recompute_position); 460 460 if (w->mapped) { 461 _owl_window_ map_internal(w);461 _owl_window_realize(w); 462 462 } 463 463 }
Note: See TracChangeset
for help on using the changeset viewer.