Re: Weird problems with keyboard
- From: Owen Taylor <owt1 cornell edu>
- To: Federico Mena <federico nuclecu unam mx>
- cc: gtk-list redhat com
- Subject: Re: Weird problems with keyboard
- Date: Fri, 06 Mar 1998 19:38:21 -0500
> > If that doesn't help, try changing
> >
> > charcount = XLookupString (&xevent->xkey, buf, buf_len,
> > (KeySym*) &event->key.keyval,
> > - &compose);
> > + NULL);
> >
> > (There are two of those)
>
> I replaced all such occurrences by NULL, and it keeps crashing. Argh
>:-(
>
> Actually, passing NULL seems to be the right thing to do. At least it
> says so in the Xlib manual; it seems that whatever is returned in the
> status_in_out parameter is not portable. It says:
>
> If present (non-NULL), the XComposeStatus structure records the
> state, which is private to Xlib, that needs preservation across
> calls to XLookupString to implement compose processing. The
> creation of XComposeStatus structures is implementation-
> dependent; a portable program must pass NULL for this argument.
Yes. But giving it a XComposeStatus structure that is initially
initialized to all zeros is a pretty standard thing to do, and
may be helpful for people who are using X11R5 and need Compose
processing. It should be safe. (with the change to 'static')
> > If neither helps, I'm on the wrong track.
>
> Do you have any idea why it would work fine when I run the program on
> an Intel box but keep the display on the Linux/Sparc? Or when I keep
> running it on the alpha but with display on a Solaris box? This looks
> pretty weird to me.
Basically no. (Some combination of Endian, word length, and
use/non-use of XKB...) But real the question in my mind is: what is
GTK doing differently from other programs?
> As soon as the Solaris machine is free, I'll get xev to tell me what
> kind of stuff X thinks the keyboard is sending. Would that be useful
> at all?
Well, it couldn't hurt. It would be interesting to compare what
the Linux/Sparc and the Solaris machines are sending and see
if there are any differences...
If I had to guess, I would suspect that the difference won't
be apparent at that level. The difference is most likely that
when you are going XFree-XFree, the XKB extension is in use,
while it isn't for XFree-Solaris.
My approach to debugging this would be to take a simple progam
(like xev - you can grab it from the untarred tree on ftp.x.org,
and it should compile OK with xmkmf), compile it with debugging,
and see exactly what arguments it is calling XLookupString with.
Then compare that to what GTK is doing.
Or you could find/make a debugging version of libX11 and try
to see what is going on there.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]