Bug 1412678 - Ensure the window most recently interacted with is the active window. r=snorp a=gchang
authorDylan Roeh <droeh@mozilla.com>
Thu, 30 Nov 2017 09:00:05 -0600
changeset 445203 0c07f502b744bec35b02295987e56ba1acc00131
parent 445202 3d247fa0cefc2dd956125e59d050e9afe58a83c5
child 445204 84e6f350f91e8ed8f0afe17ad113bf9a294cf4fa
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, gchang
bugs1412678
milestone58.0
Bug 1412678 - Ensure the window most recently interacted with is the active window. r=snorp a=gchang
widget/android/nsWindow.cpp
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -2141,16 +2141,20 @@ nsWindow::UserActivity()
 {
   if (!mIdleService) {
     mIdleService = do_GetService("@mozilla.org/widget/idleservice;1");
   }
 
   if (mIdleService) {
     mIdleService->ResetIdleTimeOut(0);
   }
+
+  if (FindTopLevel() != nsWindow::TopWindow()) {
+    BringToFront();
+  }
 }
 
 TextEventDispatcherListener*
 nsWindow::GetNativeTextEventDispatcherListener()
 {
     nsWindow* top = FindTopLevel();
     MOZ_ASSERT(top);