From f1166f226c566c3e5db06c36124d82aaa018e703 Mon Sep 17 00:00:00 2001 From: "joshmoz%gmail.com" Date: Tue, 11 Jul 2006 19:51:56 +0000 Subject: [PATCH] implement GetAttention in top-level windows. fixes attention request for session restore, probably other stuff. b=342962 r=mento --- widget/src/cocoa/nsChildView.mm | 2 +- widget/src/cocoa/nsCocoaWindow.h | 1 + widget/src/cocoa/nsCocoaWindow.mm | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/widget/src/cocoa/nsChildView.mm b/widget/src/cocoa/nsChildView.mm index a1ec90d0018..f122b2a8772 100644 --- a/widget/src/cocoa/nsChildView.mm +++ b/widget/src/cocoa/nsChildView.mm @@ -1842,7 +1842,7 @@ NS_IMETHODIMP nsChildView::SetTitle(const nsAString& title) NS_IMETHODIMP nsChildView::GetAttention(PRInt32 aCycleCount) { - [NSApp requestUserAttention:NSCriticalRequest]; + [NSApp requestUserAttention:NSInformationalRequest]; return NS_OK; } diff --git a/widget/src/cocoa/nsCocoaWindow.h b/widget/src/cocoa/nsCocoaWindow.h index c8f952a989d..3322fa2b5ee 100644 --- a/widget/src/cocoa/nsCocoaWindow.h +++ b/widget/src/cocoa/nsCocoaWindow.h @@ -145,6 +145,7 @@ public: NS_IMETHOD SetPreferredSize(PRInt32 aWidth, PRInt32 aHeight) { return NS_OK; } NS_IMETHOD DispatchEvent(nsGUIEvent* event, nsEventStatus & aStatus) ; NS_IMETHOD CaptureRollupEvents(nsIRollupListener * aListener, PRBool aDoCapture, PRBool aConsumeRollupEvent); + NS_IMETHOD GetAttention(PRInt32 aCycleCount); // be notified that a some form of drag event needs to go into Gecko virtual PRBool DragEvent(unsigned int aMessage, Point aMouseGlobal, UInt16 aKeyModifiers); diff --git a/widget/src/cocoa/nsCocoaWindow.mm b/widget/src/cocoa/nsCocoaWindow.mm index 9fcd8201717..8262dbe6abc 100644 --- a/widget/src/cocoa/nsCocoaWindow.mm +++ b/widget/src/cocoa/nsCocoaWindow.mm @@ -911,6 +911,13 @@ NS_IMETHODIMP nsCocoaWindow::CaptureRollupEvents(nsIRollupListener * aListener, } +NS_IMETHODIMP nsCocoaWindow::GetAttention(PRInt32 aCycleCount) +{ + [NSApp requestUserAttention:NSInformationalRequest]; + return NS_OK; +} + + @implementation WindowDelegate