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 MrEdKeyWindow();
|
||||
|
||||
int wx_leave_all_input_alone;
|
||||
|
||||
extern int wxTranslateRawKey(int key);
|
||||
extern short wxMacDisableMods;
|
||||
|
||||
|
@ -342,6 +344,7 @@ void wxSmuggleOutEvent(EventRef ref)
|
|||
UniChar *text;
|
||||
UInt32 actualSize;
|
||||
EventRef kref;
|
||||
UInt32 val = 0;
|
||||
|
||||
GetEventParameter(ref, kEventParamTextInputSendKeyboardEvent,
|
||||
typeEventRef, NULL, sizeof(EventRef), NULL, &kref);
|
||||
|
@ -392,6 +395,9 @@ static OSStatus smuggle_handler(EventHandlerCallRef inHandlerCallRef,
|
|||
EventRef inEvent,
|
||||
void *inUserData)
|
||||
{
|
||||
if (wx_leave_all_input_alone)
|
||||
return eventNotHandledErr;
|
||||
|
||||
wxSmuggleOutEvent(inEvent);
|
||||
return noErr;
|
||||
}
|
||||
|
|
|
@ -1385,10 +1385,13 @@ void wxApp::DoDefaultAboutItem(void)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern int wx_leave_all_input_alone;
|
||||
|
||||
void wxPrimDialogSetUp()
|
||||
{
|
||||
wxUnhideCursor();
|
||||
wxSetCursor(wxSTANDARD_CURSOR);
|
||||
wx_leave_all_input_alone++;
|
||||
}
|
||||
|
||||
void wxPrimDialogCleanUp()
|
||||
|
@ -1396,6 +1399,8 @@ void wxPrimDialogCleanUp()
|
|||
WindowPtr w;
|
||||
EventRecord event;
|
||||
|
||||
--wx_leave_all_input_alone;
|
||||
|
||||
wxTheApp->AdjustCursor();
|
||||
|
||||
/* In case the front window wasn't active when we started: */
|
||||
|
|
Loading…
Reference in New Issue
Block a user