Quick fix for missing WM_KEYUP messages on window exits in multiwindow mode (part of RE: Multiwindows problem)

Harold L Hunt II huntharo@msu.edu
Wed May 28 04:45:00 GMT 2003


Colin,

I have applied Earle's version (moved the call to WM_KILLFOCUS) of your 
patch to my local tree.  It does indeed fix the problem and it seems 
like the correct way to fix this.

The funny thing is that I had forgotten that I (or somebody else?) had 
rewritten winKeybdReleaseKeys to release *all* pressed keys rather than 
just modifier keys.  I was looking at your patching thinking, "sure, 
that works for exits with Ctrl+D, but what about typing 'exit' and 
pressing Enter?"  Silly me.  :)

In any case, I will be attributing this fix to both yourself and Earle.

Thanks for contributing,

Harold

Colin Harrison wrote:
> Hi,
> 
> I've got to stop working on this for a while.
> 
> The 'best' minimal quick fix I have for the missed WM_KEYUP events on exits
> from xterms etc. in multiwindow is:-
> 
> diff -ubB  orig_winmultiwindowwindow.c winmultiwindowwindow.c
> --- save_winmultiwindowwindow.c 2003-05-18 19:19:59.000000000 +0100
> +++ winmultiwindowwindow.c      2003-05-21 14:47:37.000000000 +0100
> @@ -984,6 +984,12 @@
>        SendMessage(hwndScreen, message, wParam, lParam);
>        return 0;
> 
> +    case WM_SETFOCUS:
> +      if (hwndScreen == NULL)
> +        break;
> +      winKeybdReleaseKeys ();
> +      return 0;
> +
>      case WM_SYSKEYDOWN:
>      case WM_SYSKEYUP:
>      case WM_SYSDEADCHAR:
> 
> 
> It's a hack, it works for me, but it does not get to gripes with the
> ultimate cause of the problem.
> I will put more time and effort into this ASAP, with a view to fixing
> problems, not adding to the work-arounds!
> 
> 
> Colin



More information about the Cygwin-xfree mailing list