Re: Weird problems with keyboard




Federico Mena Quintero <federico@nuclecu.unam.mx> writes:

> >  What libraries are on the Alpha? What OS? Does it work if
> >  the program is displayed on something other than Linux/Sparc?
> 
> The alpha has stock Red Hat 5.0.  The program works if I run it on the
> alpha but display on a Solaris box (with Sun's Xserver).
> 
> >  Does testgtk sigsegv if you press a key _inside_ an entry or
> >  text widget or just outside?
> 
> I just tested it; it does work if I press the key inside a GtkEntry or
> GtkText.  Outside them, it crashes.
> 
> Owen, I am looking at a ChangeLog entry of yours from February 24.  It
> says that key press handling for non-handled keypresses was revised.
> Does that give any useful hints?

That was just a change to the Text widget. This has something
to do with the code in gdk_event_translate.

> >  Does it help to compile with --disable-xim?
> 
> [reconfigure and make... dum de dum...]
> 
> Eek!  I just did this and now it crashes even inside entry widgets :-(

OK. That shows that the XIM'ized key handling is fine, but there
is something wrong with the handling without XIM.

I am beginning to suspect that your Xlib has compose key processing
hacked into it. 

Try making the following change to gdk.c and see if it helps:

  static gint
  gdk_event_translate (GdkEvent *event,
	  	       XEvent   *xevent)
  {

    GdkWindow *window;
    GdkWindowPrivate *window_private;
-   XComposeStatus compose;
+   static XComposeStatus compose;
    int charcount;
  #ifdef USE_XIM
    static gchar* buf = NULL;
    static gint buf_len= 0;

(GDK was passing a pointer to unitialized stack data to an argument
 that according to X specs should be ignored, but isn't always)

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)

If neither helps, I'm on the wrong track.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]