Re: [AD] another keyboard bug (bleurgh)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote:

> Thanks for helping to make Allegro bugfree!

No problems there, I really appreciate all the work you guys are doing
on it and wish I could do more. As described below, I tried hard to
fix this one myself but I'm simply not at home enough in the X code
and allegro internals.

> Confirmed. The X server doesn't send the KeyRelease event because the focus 
> is lost, so it's up to Allegro to make it so that the key is properly 
> released.

Ah, that's what I expected. I couldn't confirm it though.

> This is currently done in src/x/xkeybd.c:_xwin_keydrv_focused(), which 
> contains the following lines:
> 
>       for (i=0; i<KEY_MAX; i++) {
> 	 if (key[i])
> 	    _handle_key_release(i);
>       }
> 
> But doing so is basically wrong, because _handle_key_release()
> ... [snip]

See this is where I got lost: I couldn't figure out what
handle_key_release was actually _doing_. All that code looks like it
really doesn't do anything, because it jumps from driver to driver :-)

> Therefore we must go through the low-level keyboard handling code to 
> release the keys (see for example the Windows port). Patch attached.

I'm glad you do know how to do that, I'll try the patch later
today. If this works and the previous keyboard lock is fixed (was
there a patch for that already?), it's the last bug I have been able
to find in allegro 4.0.3.

Hein Zelle

>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-< 
 Unix is user friendly. It's just very particular about who 
 it's friends are.

 Hein Zelle                     hein@xxxxxxxxxx
	                        http://www.icce.rug.nl/~hein
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-<




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/