LibGUI: Mark Window's server fd as CLOEXEC and expose it through API
This commit is contained in:
parent
f2d6518311
commit
1066855532
|
@ -29,6 +29,9 @@ namespace LibGUI
|
|||
if (server_fd == -1)
|
||||
return BAN::Error::from_errno(errno);
|
||||
|
||||
if (fcntl(server_fd, F_SETFL, fcntl(server_fd, F_GETFL) | O_CLOEXEC) == -1)
|
||||
return BAN::Error::from_errno(errno);
|
||||
|
||||
timespec start_time;
|
||||
clock_gettime(CLOCK_MONOTONIC, &start_time);
|
||||
|
||||
|
|
|
@ -133,6 +133,8 @@ namespace LibGUI
|
|||
void set_mouse_move_event_callback(BAN::Function<void(EventPacket::MouseMoveEvent)> callback) { m_mouse_move_event_callback = callback; }
|
||||
void set_mouse_scroll_event_callback(BAN::Function<void(EventPacket::MouseScrollEvent)> callback) { m_mouse_scroll_event_callback = callback; }
|
||||
|
||||
int server_fd() const { return m_server_fd; }
|
||||
|
||||
private:
|
||||
Window(int server_fd, uint32_t* framebuffer, uint32_t width, uint32_t height)
|
||||
: m_server_fd(server_fd)
|
||||
|
|
Loading…
Reference in New Issue