From 0b901bc5c68d3e5502a92938543a58f25fe5ab67 Mon Sep 17 00:00:00 2001 From: "davidm%netscape.com" Date: Tue, 22 Jun 1999 03:06:19 +0000 Subject: [PATCH] enable window mediation git-svn-id: svn://10.0.0.236/trunk@36206 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpfe/appshell/src/nsAppShellService.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.cpp b/mozilla/xpfe/appshell/src/nsAppShellService.cpp index a0845c63512..a7d83f664a0 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.cpp +++ b/mozilla/xpfe/appshell/src/nsAppShellService.cpp @@ -126,10 +126,11 @@ protected: nsIAppShell* mAppShell; nsISupportsArray* mWindowList; nsICmdLineService* mCmdLineService; + nsIWindowMediator* mWindowMediator; }; -nsAppShellService::nsAppShellService() +nsAppShellService::nsAppShellService() : mWindowMediator( NULL ) { NS_INIT_REFCNT(); @@ -143,6 +144,8 @@ nsAppShellService::~nsAppShellService() NS_IF_RELEASE(mAppShell); NS_IF_RELEASE(mWindowList); NS_IF_RELEASE(mCmdLineService); + if ( mWindowMediator ) + nsServiceManager::ReleaseService(kWindowMediatorCID, mWindowMediator); } @@ -234,7 +237,12 @@ nsAppShellService::Initialize( nsICmdLineService *aCmdLineService ) // Initialize each registered component. EnumerateComponents( &nsAppShellService::InitializeComponent ); - + +// enable window mediation + rv = nsServiceManager::GetService(kWindowMediatorCID, kIWindowMediatorIID, + (nsISupports**) &mWindowMediator); + if ( NS_SUCCEEDED( rv) ) + mWindowMediator->Init("rdf:window-mediator"); done: return rv; }