new event filtering mustn't apply to primitive dialogs
svn: r4625
This commit is contained in:
parent
a9ab05d0f5
commit
2ccf88b6db
|
@ -41,6 +41,8 @@ static void MrDequeue(MrQueueElem *q);
|
||||||
WindowPtr MrEdMouseWindow(Point where);
|
WindowPtr MrEdMouseWindow(Point where);
|
||||||
WindowPtr MrEdKeyWindow();
|
WindowPtr MrEdKeyWindow();
|
||||||
|
|
||||||
|
int wx_leave_all_input_alone;
|
||||||
|
|
||||||
extern int wxTranslateRawKey(int key);
|
extern int wxTranslateRawKey(int key);
|
||||||
extern short wxMacDisableMods;
|
extern short wxMacDisableMods;
|
||||||
|
|
||||||
|
@ -342,6 +344,7 @@ void wxSmuggleOutEvent(EventRef ref)
|
||||||
UniChar *text;
|
UniChar *text;
|
||||||
UInt32 actualSize;
|
UInt32 actualSize;
|
||||||
EventRef kref;
|
EventRef kref;
|
||||||
|
UInt32 val = 0;
|
||||||
|
|
||||||
GetEventParameter(ref, kEventParamTextInputSendKeyboardEvent,
|
GetEventParameter(ref, kEventParamTextInputSendKeyboardEvent,
|
||||||
typeEventRef, NULL, sizeof(EventRef), NULL, &kref);
|
typeEventRef, NULL, sizeof(EventRef), NULL, &kref);
|
||||||
|
@ -392,6 +395,9 @@ static OSStatus smuggle_handler(EventHandlerCallRef inHandlerCallRef,
|
||||||
EventRef inEvent,
|
EventRef inEvent,
|
||||||
void *inUserData)
|
void *inUserData)
|
||||||
{
|
{
|
||||||
|
if (wx_leave_all_input_alone)
|
||||||
|
return eventNotHandledErr;
|
||||||
|
|
||||||
wxSmuggleOutEvent(inEvent);
|
wxSmuggleOutEvent(inEvent);
|
||||||
return noErr;
|
return noErr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1385,10 +1385,13 @@ void wxApp::DoDefaultAboutItem(void)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
extern int wx_leave_all_input_alone;
|
||||||
|
|
||||||
void wxPrimDialogSetUp()
|
void wxPrimDialogSetUp()
|
||||||
{
|
{
|
||||||
wxUnhideCursor();
|
wxUnhideCursor();
|
||||||
wxSetCursor(wxSTANDARD_CURSOR);
|
wxSetCursor(wxSTANDARD_CURSOR);
|
||||||
|
wx_leave_all_input_alone++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPrimDialogCleanUp()
|
void wxPrimDialogCleanUp()
|
||||||
|
@ -1396,6 +1399,8 @@ void wxPrimDialogCleanUp()
|
||||||
WindowPtr w;
|
WindowPtr w;
|
||||||
EventRecord event;
|
EventRecord event;
|
||||||
|
|
||||||
|
--wx_leave_all_input_alone;
|
||||||
|
|
||||||
wxTheApp->AdjustCursor();
|
wxTheApp->AdjustCursor();
|
||||||
|
|
||||||
/* In case the front window wasn't active when we started: */
|
/* In case the front window wasn't active when we started: */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user