mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-05-23 21:38:08 -04:00
wl_event_loop_add_fd: Only watch for READABLE & WRITABLE
Signed-off-by: liupeng <liupeng01@kylinos.cn>
This commit is contained in:
parent
e532b4c26c
commit
5ef24c2d17
2 changed files with 2 additions and 4 deletions
|
|
@ -575,8 +575,7 @@ struct wlr_backend *wlr_x11_backend_create(struct wl_event_loop *loop,
|
|||
}
|
||||
|
||||
int fd = xcb_get_file_descriptor(x11->xcb);
|
||||
uint32_t events = WL_EVENT_READABLE | WL_EVENT_ERROR | WL_EVENT_HANGUP;
|
||||
x11->event_source = wl_event_loop_add_fd(loop, fd, events, x11_event, x11);
|
||||
x11->event_source = wl_event_loop_add_fd(loop, fd, WL_EVENT_READABLE, x11_event, x11);
|
||||
if (!x11->event_source) {
|
||||
wlr_log(WLR_ERROR, "Could not create event source");
|
||||
goto error_display;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue