diff --git a/src/conio/x_events.c b/src/conio/x_events.c index f1835939e6eb08972f4b819e53f7caa6495140db..5236e4f64db1316088f38ba4106f1dd76b0e95e3 100644 --- a/src/conio/x_events.c +++ b/src/conio/x_events.c @@ -1590,13 +1590,14 @@ handle_configuration(int w, int h, bool map) handle_resize_event(w, h, map); } -static int x11_event(XEvent *ev) +static bool +x11_event(XEvent *ev) { bool resize; int x, y, w, h; if (x11.XFilterEvent(ev, win)) - return 0; + return false; switch (ev->type) { case ReparentNotify: parent = ev->xreparent.parent; @@ -1604,8 +1605,8 @@ static int x11_event(XEvent *ev) case ClientMessage: if (ev->xclient.format == 32 && ev->xclient.data.l[0] == A(WM_DELETE_WINDOW) && A(WM_DELETE_WINDOW) != None) { uint16_t key=CIO_KEY_QUIT; - if(write(key_pipe[1], &key, 2) != 2) - return errno; + if (write(key_pipe[1], &key, 2) != 2) + return false; } else if(ev->xclient.format == 32 && ev->xclient.data.l[0] == A(_NET_WM_PING) && A(_NET_WM_PING) != None) { ev->xclient.window = root; @@ -1897,8 +1898,8 @@ static int x11_event(XEvent *ev) else ch = cpchar_from_unicode_cpoint(getcodepage(), wbuf[i], 0); if (ch) { - if(write(key_pipe[1], &ch, 1) != 1) - return errno; + if (write(key_pipe[1], &ch, 1) != 1) + return false; } } break; @@ -2109,16 +2110,16 @@ static int x11_event(XEvent *ev) if (key < 128) key = cpchar_from_unicode_cpoint(getcodepage(), key, key); if(write(key_pipe[1], &key, (scan&0xff)?1:2) < 1) - return errno; + return false; } break; } - return(1); + return true; } default: break; } - return(0); + return false; } static void x11_terminate_event_thread(void)