public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Takuma Murakami <murakami@ipl.t.u-tokyo.ac.jp>
To: cygwin-xfree@cygwin.com
Subject: Re: Patch for keyboard handling
Date: Fri, 07 Nov 2003 09:57:00 -0000	[thread overview]
Message-ID: <20031107180424.4406.MURAKAMI@ipl.t.u-tokyo.ac.jp> (raw)
In-Reply-To: <3FA96A30.8090005@msu.edu>

Harold,

> I think I understand your original patch better now and I think that you 
> were probably doing it correctly, but I can't verify that right now.  If 
> this is what you were trying to do, then it probably is correct:
> 
> 1) Assume that no keyboard input is in the mi queue when winWindowProc 
> is called.
> 
> 2) If we are getting the keyboard focus, grab the Windows mode key state 
> and X mode key state, compare them, and send fake key presses to X to 
> get the two states in synch.
> 
> 3) Do not synch the key states anywhere else.
> 
> That would probably work because it would enqueue key messages that will 
> synch the mode key states before placing normal key messages in the 
> queue.  Thus, when we ask X for the mode key states we should get a 
> consistent result since the input queue in X is empty.

The all points are right.  I think you completely
understand this patch.  The essential difference between
the old code and this patch is to remember states by
ourselves or to peek in the internal states if necessary.
Moreover, the old code refers the states of Windows
which is not guaranteed to same as the XWin's states.

Hence I believe the patch is, at least, not worse than
the old code, though there remains some incompleteness.
One is the event queue you told, another is cooperation
with customized keyboards.

> Does that sound like what you were trying to do initially?  I got 
> confused because I couldn't keep track of where all the calls to 
> winRestoreModeKeyStates would up.

winRestoreModeKeyStates is called from WM_SETFOCUS
handlers in winTopLevelWindowProc (in -multiwindow
case) and winWindowProc (in other cases).  Only 2 places.

I hope this helps your review.

Takuma Murakami (murakami@ipl.t.u-tokyo.ac.jp)


      reply	other threads:[~2003-11-07  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03  8:25 Takuma Murakami
2003-11-03 14:30 ` Harold L Hunt II
2003-11-03 15:05   ` Takuma Murakami
2003-11-04  2:39 ` Harold L Hunt II
2003-11-04  9:04   ` Takuma Murakami
2003-11-05 21:22     ` Harold L Hunt II
2003-11-07  9:57       ` Takuma Murakami [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031107180424.4406.MURAKAMI@ipl.t.u-tokyo.ac.jp \
    --to=murakami@ipl.t.u-tokyo.ac.jp \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).