Bug 573796 - gFocusedWindow should be cleared on window destruction, r=blassey
authorMichael Wu <mwu@mozilla.com>
Tue, 22 Jun 2010 17:14:19 -0700
changeset 44158 7a66915cab32989699f46f04aecf14c141707578
parent 44157 e43fc12b3b82771ad191a92a6dcd130fede1d1f2
child 44159 aa45303615c80a66fab1e6330e4fdcedb379aa1a
push id13999
push usermwu@mozilla.com
push dateWed, 23 Jun 2010 00:20:15 +0000
treeherdermozilla-central@aa45303615c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs573796
milestone1.9.3a6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 573796 - gFocusedWindow should be cleared on window destruction, r=blassey
widget/src/android/nsWindow.cpp
--- a/widget/src/android/nsWindow.cpp
+++ b/widget/src/android/nsWindow.cpp
@@ -131,16 +131,18 @@ nsWindow::nsWindow() :
     mParent(nsnull),
     mSpecialKeyTracking(0)
 {
 }
 
 nsWindow::~nsWindow()
 {
     gTopLevelWindows.RemoveElement(this);
+    if (gFocusedWindow == this)
+        gFocusedWindow = nsnull;
     ALOG("nsWindow %p destructor", (void*)this);
 }
 
 PRBool
 nsWindow::IsTopLevel()
 {
     return mWindowType == eWindowType_toplevel ||
         mWindowType == eWindowType_dialog ||