honor the running state of the xremote service. not part of the build.

This commit is contained in:
blizzard%redhat.com 2001-09-06 20:46:57 +00:00
Родитель 2e22a5a567
Коммит a4eccb3cef
2 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -60,6 +60,7 @@ XRemoteService::XRemoteService()
{
NS_INIT_ISUPPORTS();
mNumWindows = 0;
mRunning = PR_FALSE;
}
XRemoteService::~XRemoteService()
@ -72,6 +73,7 @@ NS_IMPL_ISUPPORTS1(XRemoteService, nsIXRemoteService)
NS_IMETHODIMP
XRemoteService::Startup(void)
{
mRunning = PR_TRUE;
if (mNumWindows == 0)
CreateProxyWindow();
return NS_OK;
@ -81,6 +83,7 @@ NS_IMETHODIMP
XRemoteService::Shutdown(void)
{
DestroyProxyWindow();
mRunning = PR_FALSE;
return NS_OK;
}
@ -402,7 +405,7 @@ NS_IMETHODIMP
XRemoteService::RemoveBrowserInstance(nsIDOMWindowInternal *aBrowser)
{
mNumWindows--;
if (mNumWindows == 0)
if (mNumWindows == 0 && mRunning)
CreateProxyWindow();
// remove our keys

Просмотреть файл

@ -91,4 +91,7 @@ class XRemoteService : public nsIXRemoteService {
// the number of non-proxy windows that are set up for X Remote
PRUint32 mNumWindows;
// have we been started up from the main loop yet?
PRBool mRunning;
};