libui: Make App::process_events() private

Previously this was public as some applications (mainly terminal) needed to run some code in-between events, but this is no longer needed, due to the EventLoop providing these services (timers and file descriptor notifiers)
This commit is contained in:
apio 2024-01-08 19:13:47 +01:00
parent e4c9211edc
commit cee677b1f7
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 10 additions and 8 deletions

View File

@ -53,8 +53,6 @@ namespace ui
Result<void> handle_ipc_event(u8 id);
bool process_events();
static App& the();
private:
@ -65,6 +63,10 @@ namespace ui
bool m_should_close { false };
os::EventLoop m_loop;
bool process_events();
Window* find_window(int id);
friend void handle_socket_event(int, int);
};
}

View File

@ -19,14 +19,14 @@ Result<void> handle_ipc_client_event(os::LocalClient&, u8 id)
return ui::App::the().handle_ipc_event(id);
}
void handle_socket_event(int, int status)
{
if (status & POLLHUP) ui::App::the().set_should_close(true);
if (status & POLLIN) { ui::App::the().process_events(); }
}
namespace ui
{
void handle_socket_event(int, int status)
{
if (status & POLLHUP) ui::App::the().set_should_close(true);
if (status & POLLIN) { ui::App::the().process_events(); }
}
App* App::s_app { nullptr };
App::App()