[BRLTTY] spurious xbrlapi reconnects
Samuel Thibault
samuel.thibault at ens-lyon.org
Sat Oct 8 12:38:39 EDT 2016
Hello,
xbrlapi spuriously reconnects on every window change, because of a bogus
if: tobrltty_init should be called only when brlapi_fd<0, and not as
soon as !FD_ISSET(brlapi_fd,&readfds)
See attached patch, thanks,
Samuel
-------------- next part --------------
diff --git a/Programs/xbrlapi.c b/Programs/xbrlapi.c
index 489d73f..1520f81 100644
--- a/Programs/xbrlapi.c
+++ b/Programs/xbrlapi.c
@@ -733,9 +733,9 @@ static void toX_f(const char *display) {
default: fprintf(stderr,gettext("xbrlapi: unhandled event type: %d\n"),ev.type); break;
}
}
- if (brlapi_fd>=0 && FD_ISSET(brlapi_fd,&readfds)) {
+ if (brlapi_fd>=0) {
#ifdef CAN_SIMULATE_KEY_PRESSES
- if (haveXTest) {
+ if (haveXTest && FD_ISSET(brlapi_fd,&readfds)) {
while (((res = brlapi_readKey(0, &code))==1)) {
switch (code & BRLAPI_KEY_TYPE_MASK) {
case BRLAPI_KEY_TYPE_CMD:
More information about the BRLTTY
mailing list