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:
parent
e4c9211edc
commit
cee677b1f7
@ -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);
|
||||
};
|
||||
}
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user