Olly Betts
Letter menu accelerators (with and probably without
modifiers) don't work unless you have capslock on.
Adding a call to toupper() to the appropriate spot fixes
this (wxGtk does toupper in this case already).
Applied patch [ 608530 ] wxX11 doesn't set argv[argc] to NULL
Olly Betts
The code which creates argv under wxX11 doesn't add a
terminating element with value NULL - user code which
expects this (it's true for C/C++ argv) will fail.
Here's a patch to correct this.
I've checked the other versions of app.cpp and they all
get this right.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17160
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// We can't use wxCmdLineParser or OnInitCmdLine and friends because
// we have to create the Display earlier. If we can find a way to
// use the wxAppBase API then I'll be quite happy to change it.
// We can't use wxCmdLineParser or OnInitCmdLine and friends because
// we have to create the Display earlier. If we can find a way to
// use the wxAppBase API then I'll be quite happy to change it.
- g_newArgv = new wxChar*[argc];
+ g_newArgv = new wxChar*[argc + 1];
g_newArgc = 0;
int i;
for (i = 0; i < argc; i++)
g_newArgc = 0;
int i;
for (i = 0; i < argc; i++)
g_newArgv[g_newArgc] = argv[i];
g_newArgc ++;
}
g_newArgv[g_newArgc] = argv[i];
g_newArgc ++;
}
+ g_newArgv[g_newArgc] = NULL;
+
Display* xdisplay = NULL;
if (displayName.IsEmpty())
xdisplay = XOpenDisplay(NULL);
Display* xdisplay = NULL;
if (displayName.IsEmpty())
xdisplay = XOpenDisplay(NULL);
wxevent.m_altDown = XKeyEventAltIsDown(xevent);
wxevent.m_metaDown = XKeyEventMetaIsDown(xevent);
wxevent.SetEventObject(win);
wxevent.m_altDown = XKeyEventAltIsDown(xevent);
wxevent.m_metaDown = XKeyEventMetaIsDown(xevent);
wxevent.SetEventObject(win);
- wxevent.m_keyCode = id;
+ wxevent.m_keyCode = toupper(id);
wxevent.SetTimestamp(XKeyEventGetTime(xevent));
wxevent.m_x = XKeyEventGetX(xevent);
wxevent.SetTimestamp(XKeyEventGetTime(xevent));
wxevent.m_x = XKeyEventGetX(xevent);