Patch for keyboard handling

Takuma Murakami murakami@ipl.t.u-tokyo.ac.jp
Tue Nov 4 09:04:00 GMT 2003


Harold,

> Actually, now I am a little doubtful that this patch is complete.  If I 
> recall correctly, we are merely enqueueing input events into a queue 
> that the mi layer processes later.  Checking the mode key states within 
> the X server will only indicate what the mi layer currently knows about 
> the mode key states.  The my layer would not know that there are 
> messages in its queue that change the state of the mode keys.

I agree with you.  If the mi event queue has pending
events when winRestoreModeKeyStates is called, it may
fail to synchronize mode key states between XWin and
Windows.  However, the new code can re-sync them at
the next time winRestoreModeKeyStates is called while
it is hard to do for the old code.

> I also recall that there is a way to force the mi layer to process all 
> input events (miProcessInputEvents ?) and that this could be called 
> before querying the state of the mode key states in order to get a 
> consistent result.

Thank you for your suggestion.  mieqProcessInputEvents
seems to do the work.  I inserted a code to call it
and it looks working well for now, though I don't sure
if it is legal to call it from the place other than
ProcessInputEvents.

The attached is a revised patch to call the function.
I deeply appreciate your feedback.

Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xwin.kbd2.patch
Type: application/octet-stream
Size: 9965 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20031104/6b49c0d6/attachment.obj>


More information about the Cygwin-xfree mailing list