Always use FVIRTKEY for the accelerators under MSW.
Not using FVIRTKEY results in problems in non-US keyboard layouts and, in fact, we were already always using it because wxCharCodeWXToMSW() returned true in its output IsVirtual argument most of the time. Just do it always now and also remove IsVirtual parameter with badly (if at all...) defined meaning from wxCharCodeWXToMSW() as it's not used anywhere any longer. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
extern WXWORD wxCharCodeWXToMSW(int id, bool *isVirtual);
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -105,19 +103,15 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[]
|
||||
{
|
||||
int flags = entries[i].GetFlags();
|
||||
|
||||
BYTE fVirt = 0;
|
||||
BYTE fVirt = FVIRTKEY;
|
||||
if ( flags & wxACCEL_ALT )
|
||||
fVirt |= FALT | FVIRTKEY;
|
||||
fVirt |= FALT;
|
||||
if ( flags & wxACCEL_SHIFT )
|
||||
fVirt |= FSHIFT | FVIRTKEY;
|
||||
fVirt |= FSHIFT;
|
||||
if ( flags & wxACCEL_CTRL )
|
||||
fVirt |= FCONTROL | FVIRTKEY;
|
||||
fVirt |= FCONTROL;
|
||||
|
||||
bool isVirtual;
|
||||
|
||||
WORD key = wxCharCodeWXToMSW(entries[i].GetKeyCode(), &isVirtual);
|
||||
if (isVirtual)
|
||||
fVirt |= FVIRTKEY;
|
||||
WORD key = wxCharCodeWXToMSW(entries[i].GetKeyCode());
|
||||
|
||||
arr[i].fVirt = fVirt;
|
||||
arr[i].key = key;
|
||||
|
Reference in New Issue
Block a user