mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2025-03-12 18:32:48 +01:00
event loop: exit if the wayland socket disappears
(prevents infinite loop when your compositor crashes) Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
parent
77c6cf4fe6
commit
de3b9a77e4
6
main.c
6
main.c
@ -1025,6 +1025,12 @@ main(int argc, char **argv)
|
||||
|
||||
if (fds[WAYLAND_FD].revents & POLLIN)
|
||||
wl_display_dispatch(display);
|
||||
if (fds[WAYLAND_FD].revents & POLLERR) {
|
||||
die("Exceptional condition on wayland socket.\n");
|
||||
}
|
||||
if (fds[WAYLAND_FD].revents & POLLHUP) {
|
||||
die("Wayland socket has been disconnected.\n");
|
||||
}
|
||||
|
||||
if (fds[SIGNAL_FD].revents & POLLIN) {
|
||||
struct signalfd_siginfo si;
|
||||
|
Loading…
x
Reference in New Issue
Block a user