From 072d64bd80ef01e4ad7991ba97bb8501ef118457 Mon Sep 17 00:00:00 2001 From: "alqahira%ardisson.org" Date: Fri, 24 Oct 2008 21:28:24 +0000 Subject: [PATCH] Bug 381846 - Selecting a bookmark or new window from the dock menu does not bring application to the front. Patch by Chris Lawson , r/sr=smorgan git-svn-id: svn://10.0.0.236/trunk@254753 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/camino/src/application/MainController.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mozilla/camino/src/application/MainController.mm b/mozilla/camino/src/application/MainController.mm index 7b3255577c8..f11ce0b9676 100644 --- a/mozilla/camino/src/application/MainController.mm +++ b/mozilla/camino/src/application/MainController.mm @@ -1126,6 +1126,10 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina - (IBAction)newWindow:(id)aSender { + // Always come to the front for actions in the Dock menu + if ([aSender isKindOfClass:[NSMenuItem class]] && [aSender menu] == mDockMenu) + [NSApp activateIgnoringOtherApps:YES]; + // If we have a key window, have it autosave its dimensions before // we open a new window. That ensures the size ends up matching. NSWindow* curMainWindow = [mApplication mainWindow]; @@ -1599,6 +1603,10 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina - (IBAction)openMenuBookmark:(id)aSender { + // Always come to the front for actions in the Dock menu + if ([aSender isKindOfClass:[NSMenuItem class]] && [aSender menu] == mDockMenu) + [NSApp activateIgnoringOtherApps:YES]; + BookmarkItem* item = [aSender representedObject]; EBookmarkOpenBehavior openBehavior = eBookmarkOpenBehavior_Preferred; BOOL reverseBackgroundPref = NO;