fix for bug #42401. only add a queue that is native to the event queue list that is processed by the main UI event loop. this should fix no painting on linux when the imap password dialog comes up. r=danm, bryner, mscott a=vidur
This commit is contained in:
@@ -791,12 +791,22 @@ NS_IMETHODIMP nsAppShellService::Observe(nsISupports *aSubject,
|
||||
NS_ASSERTION(mAppShell, "appshell service notified before appshell built");
|
||||
if (topic.EqualsWithConversion(gEQActivatedNotification)) {
|
||||
nsCOMPtr<nsIEventQueue> eq(do_QueryInterface(aSubject));
|
||||
if (eq)
|
||||
mAppShell->ListenToEventQueue(eq, PR_TRUE);
|
||||
if (eq) {
|
||||
PRBool isNative = PR_TRUE;
|
||||
// we only add native event queues to the appshell
|
||||
eq->IsQueueNative(&isNative);
|
||||
if (isNative)
|
||||
mAppShell->ListenToEventQueue(eq, PR_TRUE);
|
||||
}
|
||||
} else if (topic.EqualsWithConversion(gEQDestroyedNotification)) {
|
||||
nsCOMPtr<nsIEventQueue> eq(do_QueryInterface(aSubject));
|
||||
if (eq)
|
||||
mAppShell->ListenToEventQueue(eq, PR_FALSE);
|
||||
if (eq) {
|
||||
PRBool isNative = PR_TRUE;
|
||||
// we only remove native event queues from the appshell
|
||||
eq->IsQueueNative(&isNative);
|
||||
if (isNative)
|
||||
mAppShell->ListenToEventQueue(eq, PR_FALSE);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user