Bug 793150 - Exit full-screen mode when invoking the menu. r=sriram
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 30 Nov 2012 12:59:49 -0500
changeset 114618 2bf9b04dd7cf417832ba3cda12b6d03e2f897dde
parent 114617 9252522aab902d063792370a7be66a538391f361
child 114619 167b31ff36c2be9f64e0792c71fb1db6eccca1f4
push id23926
push userryanvm@gmail.com
push dateSat, 01 Dec 2012 15:27:30 +0000
treeherdermozilla-central@ecdf0e332f17 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram
bugs793150
milestone20.0a1
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 793150 - Exit full-screen mode when invoking the menu. r=sriram
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -583,16 +583,21 @@ abstract public class GeckoApp
         if (Build.VERSION.SDK_INT >= 11 && featureId == Window.FEATURE_OPTIONS_PANEL)
             return onPrepareOptionsMenu(menu);
 
         return super.onPreparePanel(featureId, view, menu);
     }
 
     @Override
     public boolean onMenuOpened(int featureId, Menu menu) {
+        // exit full-screen mode whenever the menu is opened
+        if (mLayerView.isFullScreen()) {
+            GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FullScreen:Exit", null));
+        }
+
         if (Build.VERSION.SDK_INT >= 11 && featureId == Window.FEATURE_OPTIONS_PANEL) {
             if (mMenu == null) {
                 onCreatePanelMenu(featureId, menu);
                 onPreparePanel(featureId, mMenuPanel, mMenu);
             }
 
             // Scroll custom menu to the top
             if (mMenuPanel != null)