Merge branch 'wayland' of https://github.com/kennylevinsen/kitty
This commit is contained in:
commit
c68b302fa2
16
glfw/wl_window.c
vendored
16
glfw/wl_window.c
vendored
@ -762,17 +762,9 @@ handleEvents(monotonic_t timeout)
|
|||||||
EVDBG("starting handleEvents(%.2f)", monotonic_t_to_s_double(timeout));
|
EVDBG("starting handleEvents(%.2f)", monotonic_t_to_s_double(timeout));
|
||||||
|
|
||||||
while (wl_display_prepare_read(display) != 0) {
|
while (wl_display_prepare_read(display) != 0) {
|
||||||
while(1) {
|
if (wl_display_dispatch_pending(display) == -1) {
|
||||||
errno = 0;
|
abortOnFatalError(errno);
|
||||||
int num_dispatched = wl_display_dispatch_pending(display);
|
return;
|
||||||
if (num_dispatched < 0) {
|
|
||||||
if (errno == EAGAIN) continue;
|
|
||||||
int last_error = wl_display_get_error(display);
|
|
||||||
wl_display_cancel_read(display);
|
|
||||||
if (last_error) abortOnFatalError(last_error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -782,8 +774,8 @@ handleEvents(monotonic_t timeout)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
if (wl_display_flush(display) < 0 && errno != EAGAIN)
|
if (wl_display_flush(display) < 0 && errno != EAGAIN)
|
||||||
{
|
{
|
||||||
abortOnFatalError(errno);
|
|
||||||
wl_display_cancel_read(display);
|
wl_display_cancel_read(display);
|
||||||
|
abortOnFatalError(errno);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user