From 32b8e70161195819bd6b952892f74d9967028a6f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 Jan 2010 12:16:44 +0000 Subject: [PATCH] Implement RequestUserAttention() for wxOSX/Cocoa. Simply use NSApplication:requestUserAttention to do it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/cocoa/nonownedwnd.mm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index b6e4af920f..ddca7b49a3 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -692,8 +692,25 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style)) return true; } -void wxNonOwnedWindowCocoaImpl::RequestUserAttention(int WXUNUSED(flags)) +void wxNonOwnedWindowCocoaImpl::RequestUserAttention(int flagsWX) { + int flagsOSX; + switch ( flagsWX ) + { + case wxUSER_ATTENTION_INFO: + flagsOSX = NSInformationalRequest; + break; + + case wxUSER_ATTENTION_ERROR: + flagsOSX = NSCriticalRequest; + break; + + default: + wxFAIL_MSG( "invalid RequestUserAttention() flags" ); + return; + } + + [NSApp requestUserAttention:flagsOSX]; } void wxNonOwnedWindowCocoaImpl::ScreenToWindow( int *x, int *y )