| 62 | } |
| 63 | |
| 64 | void GDREWindow::_notification(int p_what) { |
| 65 | if (p_what == NOTIFICATION_PROCESS) { |
| 66 | if (!next_process_calls.is_empty()) { |
| 67 | auto calls = next_process_calls; |
| 68 | next_process_calls.clear(); |
| 69 | for (const auto &callable : calls) { |
| 70 | callable.call(); |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void GDREWindow::call_on_next_process(const Callable &p_callable) { |
| 77 | next_process_calls.push_back(p_callable); |