diff -r b57c5fc53578 -r 868cceedabd3 browserui/browser/BrowserAppSrc/BrowserAppUi.cpp --- a/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp Fri Nov 06 13:02:00 2009 +0200 +++ b/browserui/browser/BrowserAppSrc/BrowserAppUi.cpp Thu Dec 17 08:47:18 2009 +0200 @@ -19,7 +19,7 @@ // INCLUDES -#include +#include #include #include #include @@ -30,10 +30,10 @@ #include #include #include -#include "FavouritesFile.h" +#include "favouritesfile.h" #include #include -#include +#include #include #include #include @@ -46,20 +46,20 @@ #include #endif -#include +#include #include -#include "BrowserOverriddenSettings.h" +#include "browseroverriddensettings.h" #include "BrowserLauncherService.h" -#include "CookieManagerClient.h" +#include "cookiemanagerclient.h" #ifdef __SERIES60_HELP #include #endif //__SERIES60_HELP #include "BrowserAppDocument.h" -#include "DownloadedContentHandler.h" +#include "downloadedcontenthandler.h" #include "BrowserBmOTABinSender.h" #include "BrowserCommandLineParser.h" #include "BrowserApplication.h" @@ -78,11 +78,12 @@ #include "BrowserPreferences.h" #include "SessionAndSecurity.h" #include "BrowserUIVariant.hrh" +#include "BrowserWindowQueue.h" #include "Logger.h" #include -#include -#include "BrowserDialogsProvider.h" +#include +#include "browserdialogsprovider.h" #include "BrowserSoftkeysObserver.h" #include "BrowserLoadObserver.h" #include "BrowserSpecialLoadObserver.h" @@ -91,9 +92,9 @@ // Dialogs Provider -#include -#include -#include +#include +#include +#include // Multiple Windows #include "BrowserPopupEngine.h" @@ -3585,6 +3586,12 @@ //There are only two cases for closing window. One is user initialized and the //other is script initialized. For both cases, the window should be deleted. TBool forceDelete( ETrue ); + // this variable is useful to know if the window has a parent window which needs to be activated on closing current window + TBool parentPresent(EFalse); + if ( WindowMgr().CurrentWindowQue() && WindowMgr().CurrentWindowQue()->iParent ) + { + parentPresent = ETrue; + } // delete the current window by default if( aWindowId == 0 ) { @@ -3619,7 +3626,7 @@ if( winId > 0 ) // still remain a window to be activated { WindowMgr().SwitchWindowL( winId ); - if(CalledFromAnotherApp() && (!IsEmbeddedModeOn())) + if(CalledFromAnotherApp() && (!IsEmbeddedModeOn()) && !parentPresent) { SetCalledFromAnotherApp(EFalse); SendBrowserToBackground(); @@ -4088,7 +4095,7 @@ // --------------------------------------------------------- // CBrowserAppUi::HandleSystemEventL // --------------------------------------------------------- - +#if defined(__S60_50__) void CBrowserAppUi::HandleSystemEventL(const TWsEvent& aEvent) { @@ -4109,7 +4116,7 @@ // call base class implementation CAknAppUi::HandleSystemEventL(aEvent); } - +#endif // --------------------------------------------------------- // CBrowserAppUi::StartFetchHomePageL // ---------------------------------------------------------