From 80fc72dd47ca4a0fe960e5d61a7f46109fb3db2b Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 15 Feb 2000 09:31:11 +0000 Subject: [PATCH] Add icon notifications to GetAttention(). Now, the mozilla icon will flash if gaetattention is called and the app is in the background. r=sfraser. git-svn-id: svn://10.0.0.236/trunk@60860 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/mac/nsWindow.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/widget/src/mac/nsWindow.cpp b/mozilla/widget/src/mac/nsWindow.cpp index da2b6aa056a..f31aeae4e83 100644 --- a/mozilla/widget/src/mac/nsWindow.cpp +++ b/mozilla/widget/src/mac/nsWindow.cpp @@ -39,6 +39,8 @@ #include #include +#include +#include #include "nsplugindefs.h" #include "nsMacEventHandler.h" @@ -1943,6 +1945,9 @@ NS_IMETHODIMP nsWindow::GetAttention() // After all that checking we install a notification manager request to mark the app's icon // in the process menu and play the default alert sound + Handle icon; + OSErr err; + if (we_are_front_process()) return NS_OK; @@ -1952,10 +1957,13 @@ NS_IMETHODIMP nsWindow::GetAttention() gNotificationInstalled = false; } + err = GetIconSuite( &gNMRec.nmIcon, 128, svAllSmallData ); + if ( err != noErr ) + gNMRec.nmIcon = NULL; + // Setup and install the notification manager rec gNMRec.qType = nmType; gNMRec.nmMark = 1; // Flag the icon in the process menu - gNMRec.nmIcon = NULL; // It'd be nice if we had an icon to flash - maybe later gNMRec.nmSound = (Handle)-1L; // Use the default alert sound gNMRec.nmStr = NULL; // No alert/window so no text gNMRec.nmResp = NULL; // No response proc, use the default behavior