Changeset bc6d81d
- Timestamp:
- Sep 27, 2011, 4:19:08 PM (12 years ago)
- Parents:
- bbd0cf1 (diff), 8e40da74 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
window.c
rf271129 r8e40da74 441 441 } 442 442 443 static bool _owl_window_is_subtree_dirty(owl_window *w) 444 { 445 owl_window *child; 446 447 if (w->dirty) 448 return true; 449 for (child = w->child; 450 child != NULL; 451 child = child->next) { 452 if (child->dirty_subtree) 453 return true; 454 } 455 return false; 456 } 457 443 458 static void _owl_window_redraw_subtree(owl_window *w) 444 459 { 445 460 FuncOneArg ptr = (FuncOneArg)_owl_window_redraw_subtree; 461 446 462 if (!w->dirty_subtree) 447 463 return; 464 448 465 _owl_window_redraw(w); 449 466 owl_window_children_foreach(w, first_arg_only, &ptr); 450 w->dirty_subtree = 0; 467 468 /* Clear the dirty_subtree bit, unless a child doesn't have it 469 * cleared because we dirtied a window in redraw. Dirtying a 470 * non-descendant window during a redraw handler is 471 * discouraged. Redraw will not break, but it is undefined whether 472 * the dirty is delayed to the next event loop iteration. */ 473 if (_owl_window_is_subtree_dirty(w)) { 474 owl_function_debugmsg("subtree still dirty after one iteration!"); 475 } else { 476 w->dirty_subtree = 0; 477 } 451 478 } 452 479
Note: See TracChangeset
for help on using the changeset viewer.