This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: Patch for keyboard handling
- From: Harold L Hunt II <huntharo at msu dot edu>
- To: cygwin-xfree at cygwin dot com
- Date: Mon, 03 Nov 2003 09:30:12 -0500
- Subject: Re: Patch for keyboard handling
- References: <20031103163010.840F.MURAKAMI@ipl.t.u-tokyo.ac.jp>
- Reply-to: cygwin-xfree at cygwin dot com
Takuma Murakami wrote:
I have made a patch to improve keyboard handling.
Any comments would be appreciated.
The changes are:
1) win.h, winkeybd.c, winwndproc.c - Improve the
synchronization of mode key states between XWin
and Windows.
+ /* Stored to get internal mode key states. Must be read-only. */
+ static unsigned short *g_winInternalModeKeyStatesPtr = NULL;
Shouldn't this be a pointer to constant data? Isn't that:
static unsigned short const * g_winInternalModeKeyStatesPtr = NULL;
???
2) winmultiwindowwndproc.c - Enable mode key
synchronization in -multiwindow mode.
+ g_winInternalModeKeyStatesPtr = &(pDeviceInt->key->state);
Wow! That is a really good idea. I should have been doing that all
along, but I didn't realize that I could access the internal mode-key
states. Great idea.
3) winwndproc.c - Make clean termination on
logoff or shutdown.
Good catch for WM_ENDSESSION. That should have been there all along...
4) winconfig.c - Fix the lacks of KEYUP messages in
Japanese environments. The solution was proposed
by Kensuke Matsuzaki.
Looks good to me. It all depends on if it works for you guys.
5) winwndproc.c - Ignore Windows keyboard auto-repeats
so that XWin controls auto-repeats instead of Windows.
Okay.
I will try to apply this patch tomorrow.
Thanks for contributing,
Harold