From 0506ca384b26b784c65f80f595a0592b07a320e2 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 8 Sep 2006 04:12:22 +0000 Subject: [PATCH] Flush all input events after the dialog box closes. Without this, pressing return to close the dialog box sends an event (usually menu start or equivalent). --- stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp b/stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp index ee40c5c431..996c194c3c 100644 --- a/stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp +++ b/stepmania/src/arch/Dialog/DialogDriver_Cocoa.cpp @@ -3,6 +3,7 @@ #include "DialogDriver_Cocoa.h" #include "RageThreads.h" #include "ProductInfo.h" +#include "InputFilter.h" #include static CFOptionFlags ShowAlert( CFOptionFlags flags, const RString& sMessage, CFStringRef OK, @@ -13,6 +14,8 @@ static CFOptionFlags ShowAlert( CFOptionFlags flags, const RString& sMessage, CF CFUserNotificationDisplayAlert( 0.0, flags, NULL, NULL, NULL, CFSTR(PRODUCT_FAMILY), text, OK, alt, other, &result ); + // Flush all input that's accumulated while the dialog box was up. + INPUTFILTER->FlushInputEvents(); CFRelease( text ); return result; }