diff options
author | Benji Dial <benji6283@gmail.com> | 2021-03-11 22:00:22 -0500 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2021-03-11 22:00:22 -0500 |
commit | 5fcf57739e68a8b5053e03778aaee0eed445babd (patch) | |
tree | e7a8bab18668d112e58b1b48190195035c71fa8a /src/user/raleigh/runtime.cpp | |
parent | 0f2398d1f622cce37925f52d978d92e6cce1c7a9 (diff) | |
download | portland-os-5fcf57739e68a8b5053e03778aaee0eed445babd.tar.gz |
settings editor, and lots of changes in service of that
Diffstat (limited to 'src/user/raleigh/runtime.cpp')
-rw-r--r-- | src/user/raleigh/runtime.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/user/raleigh/runtime.cpp b/src/user/raleigh/runtime.cpp index 6dafed1..d021537 100644 --- a/src/user/raleigh/runtime.cpp +++ b/src/user/raleigh/runtime.cpp @@ -4,19 +4,24 @@ namespace raleigh { dllist<window &> open_windows; + dllist<window &> to_be_deleted; __attribute__ ((noreturn)) void start_runtime() { while (1) { + for (dllist<window &>::node *w = open_windows.first; w; w = w->next) + w->d.consume_actions(); + l: + for (dllist<window &>::node *w = to_be_deleted.first; w; w = w->next) { + _delete_window(w->d.handle); + w->d.handle = 0; + open_windows.try_remove_by_ref(w->d); + w = to_be_deleted.remove_in_place(w); + if (!w) + goto l; + } if (!open_windows.first) __pcrt_quit(); - for (dllist<window &>::node *w = open_windows.first; w; w = w->next) - if (w->d.try_actions() == window::DELETE) { - _delete_window(w->d.handle); - w->d.handle = 0; - if (!(w = open_windows.remove_in_place(w))) - break; - } _wait_for_action(); _yield_task(); } |