David Dawes wrote:
> >That in turn uses _XReply() to fill in a xkbGetKbdByNameReply struct, and
> >either that call fails, or the "reported" field of the struct is set to
> >zero. (line 142 in XKBGetByName.c)
> 
> Does the xset call actually change the repeat rate when this happens
> (with your fix)?  Also, do you need to do anything special to reproduce
> this?  A check for a NULL return value from XkbGetKeyboard() should be
> added (and I'll do that), but I'm wondering what ignoring it might be
> covering up.

  It may seem strange but there really is a big difference between
an XkbGetKeyboard call and a pair XkbAllocKeyboard - XkbGetControls calls.
  Since the XkbGetKeyboard call actually use an XkbGetKeyboardByName it does
its task in a long indirect way:
- converts all server internal structures into an .xkb file format
- calls an xkbcomp and passes this text to its input
- the xkbcomp writes the result as an .xkm file
- the server reads and parses this file
- and finally sends the result of parsing to the client
  In the same time the XkbGetControls just delivers contents of needed
structures to the client.

  Thus you see there can be many reasons why the XkbGetKeyboard fails but
the XkbGetControls works well.
  And I think the right way here isn't to check a NULL result but to get rid
of the XkbGetKeyboard and use the XkbAllocKeyboard (which allocates a 'base'
structure for all elements of an xkb description) and some call(s) which
delivers only parts of a complete xkb description that are really needed for
an application.  (Unless one really needs a complete description).
  Regardless on does the XkbGetKeyboard fail or not it is 'too expensive' in
case one wants to change a couple of flags/values in XKB server structures.

  Of course there still is a question why the XkbGetKeyboard (one of its steps)
fails.
-- 
 Ivan U. Pascal         |   e-mail: [EMAIL PROTECTED]
   Administrator of     |   Tomsk State University
     University Network |       Tomsk, Russia
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to