fix arrow-key navigation of menus in Mac OS X 10.5
svn: r7728
This commit is contained in:
parent
f085196bf8
commit
8b0e48d7aa
|
@ -51,6 +51,8 @@ int wxTranslateRawKey(int key);
|
||||||
|
|
||||||
int wxMenuBarHeight;
|
int wxMenuBarHeight;
|
||||||
|
|
||||||
|
extern int wx_leave_all_input_alone;
|
||||||
|
|
||||||
extern wxApp *wxTheApp;
|
extern wxApp *wxTheApp;
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
wxApp::wxApp():wxbApp()
|
wxApp::wxApp():wxbApp()
|
||||||
|
@ -369,7 +371,9 @@ void wxApp::doMacMouseDown(void)
|
||||||
|
|
||||||
wxTracking();
|
wxTracking();
|
||||||
wxPrepareMenuDraw();
|
wxPrepareMenuDraw();
|
||||||
|
wx_leave_all_input_alone++;
|
||||||
menuResult = MenuSelect(cCurrentEvent.where);
|
menuResult = MenuSelect(cCurrentEvent.where);
|
||||||
|
--wx_leave_all_input_alone;
|
||||||
wxDoneMenuDraw(!!menuResult);
|
wxDoneMenuDraw(!!menuResult);
|
||||||
doMacInMenuBar(menuResult, FALSE);
|
doMacInMenuBar(menuResult, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -1437,8 +1441,6 @@ void wxApp::DoDefaultAboutItem(void)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
extern int wx_leave_all_input_alone;
|
|
||||||
|
|
||||||
void wxPrimDialogSetUp()
|
void wxPrimDialogSetUp()
|
||||||
{
|
{
|
||||||
wxUnhideCursor();
|
wxUnhideCursor();
|
||||||
|
|
|
@ -41,6 +41,8 @@
|
||||||
#define PAD_X 2
|
#define PAD_X 2
|
||||||
#define MSPACEY 1
|
#define MSPACEY 1
|
||||||
|
|
||||||
|
extern int wx_leave_all_input_alone;
|
||||||
|
|
||||||
static char *protect_leading_hyphen(char *s)
|
static char *protect_leading_hyphen(char *s)
|
||||||
{
|
{
|
||||||
if (s[0] == '-') {
|
if (s[0] == '-') {
|
||||||
|
@ -316,7 +318,9 @@ void wxChoice::OnEvent(wxMouseEvent *event) // mac platform only
|
||||||
startPt.h = startH - PAD_Y;
|
startPt.h = startH - PAD_Y;
|
||||||
|
|
||||||
wxTracking();
|
wxTracking();
|
||||||
|
wx_leave_all_input_alone++;
|
||||||
trackResult = TrackControl(cMacControl,startPt,(ControlActionUPP)-1);
|
trackResult = TrackControl(cMacControl,startPt,(ControlActionUPP)-1);
|
||||||
|
--wx_leave_all_input_alone;
|
||||||
if (trackResult) {
|
if (trackResult) {
|
||||||
wxCommandEvent *commandEvent;
|
wxCommandEvent *commandEvent;
|
||||||
selection = GetControlValue(cMacControl);
|
selection = GetControlValue(cMacControl);
|
||||||
|
|
|
@ -155,7 +155,7 @@ void wxCanvasDC::DrawText(const char* text, double x, double y, Bool combine, Bo
|
||||||
gleaned from ATSUI on a previous round. We can save a factor of
|
gleaned from ATSUI on a previous round. We can save a factor of
|
||||||
10 for all but the smallest strings by avoiding ATSUI this
|
10 for all but the smallest strings by avoiding ATSUI this
|
||||||
time. */
|
time. */
|
||||||
if (!combine
|
if (!combine
|
||||||
&& ucs4
|
&& ucs4
|
||||||
&& (angle == 0.0)
|
&& (angle == 0.0)
|
||||||
&& table_key
|
&& table_key
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
int SetOriginX = 0;
|
int SetOriginX = 0;
|
||||||
int SetOriginY = 0;
|
int SetOriginY = 0;
|
||||||
|
|
||||||
|
extern int wx_leave_all_input_alone;
|
||||||
|
|
||||||
/* The gMouseWindow declaration confises xform.ss. */
|
/* The gMouseWindow declaration confises xform.ss. */
|
||||||
#ifdef MZ_PRECISE_GC
|
#ifdef MZ_PRECISE_GC
|
||||||
START_XFORM_SKIP;
|
START_XFORM_SKIP;
|
||||||
|
@ -2092,7 +2094,9 @@ Bool wxWindow::PopupMenu(wxMenu *menu, double x, double y)
|
||||||
pos.h = (short)x + SetOriginX;
|
pos.h = (short)x + SetOriginX;
|
||||||
LocalToGlobal(&pos);
|
LocalToGlobal(&pos);
|
||||||
wxTracking();
|
wxTracking();
|
||||||
|
wx_leave_all_input_alone++;
|
||||||
sel = ::PopUpMenuSelect(m, pos.v, pos.h, 0);
|
sel = ::PopUpMenuSelect(m, pos.v, pos.h, 0);
|
||||||
|
--wx_leave_all_input_alone;
|
||||||
|
|
||||||
ReleaseCurrentDC();
|
ReleaseCurrentDC();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user