Bug 684242 - don't send synthetic SURFACE_DESTROY event when stopping on Android [r=ajuma]
authorJames Willcox <jwillcox@mozilla.com>
Thu, 08 Sep 2011 11:10:36 -0400
changeset 76758 36282a6788df50b45803a96c9e9fb8676518575e
parent 76757 eb8a6747f6838df1df2a76f49b387beda68a90cf
child 76759 e78194321e9447749293b2a7b6bc2422d14f41de
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersajuma
bugs684242
milestone9.0a1
Bug 684242 - don't send synthetic SURFACE_DESTROY event when stopping on Android [r=ajuma] From d88f7db9e74c0b4e2df307e417ef9e582266c3e2 Mon Sep 17 00:00:00 2001
widget/src/android/nsAppShell.cpp
--- a/widget/src/android/nsAppShell.cpp
+++ b/widget/src/android/nsAppShell.cpp
@@ -441,20 +441,16 @@ nsAppShell::PeekNextEvent()
     }
 
     return ae;
 }
 
 void
 nsAppShell::PostEvent(AndroidGeckoEvent *ae)
 {
-    if (ae->Type() == AndroidGeckoEvent::ACTIVITY_STOPPING) {
-        PostEvent(new AndroidGeckoEvent(AndroidGeckoEvent::SURFACE_DESTROYED));
-    }
-
     {
         MutexAutoLock lock(mQueueLock);
         if (ae->Type() == AndroidGeckoEvent::SURFACE_DESTROYED) {
             // Give priority to this event, and discard any pending
             // SURFACE_CREATED events.
             mEventQueue.InsertElementAt(0, ae);
             AndroidGeckoEvent *event;
             for (int i = mEventQueue.Length()-1; i >=1; i--) {