[BRLTTY] More then one connection to brlapi
Samuel Thibault
samuel.thibault at ens-lyon.org
Tue Nov 22 05:18:28 EST 2005
Hi,
Jan Buchal, le Tue 22 Nov 2005 08:51:04 +0100, a écrit :
> I'am not quite sure if I understood well. I put in my .xsession these
> lines:
> xbrlapi&
> export WINDOWSPATH=8
>
> xbindkeys
> gnome-session
Ah, you let gnome-session run gnopernicus, and hence it gets the
WINDOWSPATH variable.
Please try the attached patch.
Dave, could you please apply those patches to the brltty repository?
Regards,
Samuel
-------------- next part --------------
Index: braille/libbrl/ttybrl.c
===================================================================
RCS file: /cvs/gnome/gnopernicus/braille/libbrl/ttybrl.c,v
retrieving revision 1.15
diff -u -r1.15 ttybrl.c
--- braille/libbrl/ttybrl.c 26 Sep 2005 07:18:07 -0000 1.15
+++ braille/libbrl/ttybrl.c 22 Nov 2005 10:14:55 -0000
@@ -368,6 +368,15 @@
client_callback = device_callback;
+ if (getenv("WINDOWSPATH")) {
+ if (brlapi_getTtyPath (NULL, 0, BRLCOMMANDS) == -1)
+ {
+ brlapi_perror(_("Unable to get Tty"));
+ return 0;
+ }
+ goto gottty;
+ }
+
/* Determine the TTY where the X server is running.
This only works with XFree86 starting from 4.3.99.903 and X.Org
@@ -433,6 +442,7 @@
return 0;
}
+gottty:
ignore_block(BRL_BLK_PASSCHAR);
ignore_block(BRL_BLK_PASSDOTS);
ignore_block(BRL_BLK_PASSKEY);
-------------- next part --------------
Index: Programs/xbrlapi.c
===================================================================
--- Programs/xbrlapi.c (révision 2054)
+++ Programs/xbrlapi.c (copie de travail)
@@ -130,8 +130,13 @@
}
void vtno(int vtno) {
- if (brlapi_getTty(vtno,NULL)<0)
- fatal_brlapi_errno("getTty",gettext("cannot get tty %d\n"),vtno);
+ if (getenv("WINDOWSPATH")) {
+ if (brlapi_getTtyPath(NULL,0,NULL)<0)
+ fatal_brlapi_errno("getTtyPath",gettext("cannot get tty\n"));
+ } else {
+ if (brlapi_getTty(vtno,NULL)<0)
+ fatal_brlapi_errno("getTty",gettext("cannot get tty %d\n"),vtno);
+ }
if (brlapi_ignoreKeyRange(0,BRL_KEYCODE_MAX)<0)
fatal_brlapi_errno("ignoreKeys",gettext("cannot ignore keys on tty %d\n"),vtno);
#ifdef HAVE_X11_EXTENSIONS_XTEST_H
More information about the BRLTTY
mailing list