blob: 6dafed1e8a9edccce4ce36d93225c4683878e0bc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include <raleigh/runtime.h>
#include <raleigh/window.h>
#include <pland/pcrt.h>
namespace raleigh {
dllist<window &> open_windows;
__attribute__ ((noreturn))
void start_runtime() {
while (1) {
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();
}
}
}
|