Accept WM_SYSCHAR message for processsing in TranslateAcceleratorW

Dmitry Timoshkov dmitry at baikal.ru
Wed Sep 22 06:20:31 CDT 2004


"Rein Klazes" <rklazes at xs4all.nl> wrote:

> If I use <alt>+W to access the Windows menu the program reacts as if I
> pressed just the 'W'. This is also an accelator key causing the current
> thread to be 'Watched'. Same thing with <ALT>+H, it should bring up the
> help menu. Now it causes the headers to display, normally behind the 'H'
> key.
> <ALT>-E works normal, probably because the 'E' is not accelerated.

Perhaps a way used by TranslateAcceleratorW to detect Alt/Ctrl/Shift state
is the source of the problem (it uses GetKeyState instead of the state passed
in lParam). It seems that somehow it leads to a wrong match between an actual
modifiers state and the key state in the accelerator table.

> > this patch makes accelerator keys in my test MDI app (compiled with MSVC)
> > work under Wine. The problem is that Wine correctly generates WM_SYSKEY*
> > and WM_SYSCHAR messages when there is no focus window, but WM_SYSCHAR
> > is not considered by TranslateAcceleratorW as a valid input.
> 
> Uhh, "The problem is that Wine correctly generates ...". Do you mean
> this is a hack?

No, this is a correct behaviour, I sent a test case which confirms that.

> BTW. Your other patch "Make message flow for MDI ..." fixes the problem
> with maximized/restored MDI windows in Agent, thanks.

Great, my work was targetting a similar problem in my app.

-- 
Dmitry.




More information about the wine-devel mailing list