LibGUI: Allow timeout with Window::wait_events
This commit is contained in:
@@ -300,10 +300,10 @@ namespace LibGUI
|
||||
return {};
|
||||
}
|
||||
|
||||
void Window::wait_events()
|
||||
void Window::wait_events(const timespec* timeout)
|
||||
{
|
||||
epoll_event dummy;
|
||||
epoll_wait(m_epoll_fd, &dummy, 1, -1);
|
||||
epoll_pwait2(m_epoll_fd, &dummy, 1, timeout, nullptr);
|
||||
}
|
||||
|
||||
void Window::poll_events()
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace LibGUI
|
||||
uint32_t width() const { return m_width; }
|
||||
uint32_t height() const { return m_height; }
|
||||
|
||||
void wait_events();
|
||||
void wait_events(const timespec* timeout = nullptr);
|
||||
void poll_events();
|
||||
|
||||
void set_socket_error_callback(BAN::Function<void()> callback) { m_socket_error_callback = callback; }
|
||||
|
||||
Reference in New Issue
Block a user