This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch for keyboard handling


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)

Attachment: xwin.kbd2.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]