Hide the menu bar by default on Linux

RESOLVED FIXED in Firefox 28

Status

()

defect
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: jhorak, Assigned: jhorak)

Tracking

(Blocks 1 bug)

Trunk
Firefox 28
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Australis:P3][Australis:M9])

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

6 years ago
Fedora would like to hide menubar by default and replace it by browser button. To do it by clean way we need about:config preference to set system wide toolbar-menubar's autohide attribute (only for new profiles).

Reference bug:
https://bugzilla.redhat.com/show_bug.cgi?id=981660
Actually, what's keeping us from making it the default everywhere?
We're going to make it default in Fedora...so +1 for default everywhere.
(that being said, you can probably set it hidden for new profiles through the default localstore.rdf)
(In reply to Mike Hommey [:glandium] from comment #1)
> Actually, what's keeping us from making it the default everywhere?

Keyboard accessibility. Linux doesn't show the menu bar when pressing Alt, you need to press Alt+[letter] without a hint what letter that might be. I believe F10 works, though, but that's not a widely known key among users.
(Assignee)

Comment 5

6 years ago
So if Alt key shows menubar in Linux we can make it default, right? Is the only blocker?
(In reply to jhorak from comment #5)
> So if Alt key shows menubar in Linux we can make it default, right? Is the
> only blocker?

AFAIK, yes.
(Assignee)

Comment 7

6 years ago
I see that ui.key.menuAccessKeyFocuses preference when set to true shows menu when Alt key is pressed. It's enabled for Windows here: 
http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.js#2514

There might be some drawback though. It works even When menubar is not hidden (ie. it popups File menu). I'm not sure if this is an error or desired behaviour. Please let me know if that's need to be fixed.
(In reply to jhorak from comment #7)
> I see that ui.key.menuAccessKeyFocuses preference when set to true shows
> menu when Alt key is pressed. It's enabled for Windows here: 
> http://mxr.mozilla.org/mozilla-central/source/modules/libpref/src/init/all.
> js#2514
> 
> There might be some drawback though. It works even When menubar is not
> hidden (ie. it popups File menu). I'm not sure if this is an error or
> desired behaviour. Please let me know if that's need to be fixed.

I suspect that desired behavior, but I don't know.
(Assignee)

Updated

6 years ago
Summary: Make default toolbar-menubar autohide attribute configurable by preference → Make application button default on Linux
(Assignee)

Comment 9

6 years ago
Patch will make application button default on Linux and hides menubar for new profiles. It also ui.key.menuAccessKeyFocuses to true on Linux to allow access to menubar by Alt key.
Attachment #789588 - Flags: review?(jaws)
(Assignee)

Comment 10

6 years ago
Posted patch Firefox-button.patch (obsolete) — Splinter Review
Fixed comment in patch.
Attachment #789588 - Attachment is obsolete: true
Attachment #789588 - Flags: review?(jaws)
Attachment #789589 - Flags: review?(jaws)
A few comments:
- XP_UNIX is also defined on OSX
- do we really need an overlay to do this?
- do we really want to do this now, given that Australis is around the corner?
Does australis change the application button code?
(In reply to Mike Hommey [:glandium] from comment #12)
> Does australis change the application button code?

Yes, Australis removes the application button completely in favour of a new menu button that appears at the end of the nav-bar (right-most end for LTR locales, left-most end for RTL).
(In reply to Mike Conley (:mconley) from comment #13)
> (In reply to Mike Hommey [:glandium] from comment #12)
> > Does australis change the application button code?
> 
> Yes, Australis removes the application button completely in favour of a new
> menu button that appears at the end of the nav-bar (right-most end for LTR
> locales, left-most end for RTL).

In addition, all users regardless of menu-bar visibility will have the menu button available.

Mike: With that said, is the menu-bar going to be hidden by default on Linux with Australis? I think fixing this bug might still be needed.
Flags: needinfo?(mconley)
(In reply to Jared Wein [:jaws] from comment #14)
> (In reply to Mike Conley (:mconley) from comment #13)
> > (In reply to Mike Hommey [:glandium] from comment #12)
> > > Does australis change the application button code?
> > 
> > Yes, Australis removes the application button completely in favour of a new
> > menu button that appears at the end of the nav-bar (right-most end for LTR
> > locales, left-most end for RTL).
> 
> In addition, all users regardless of menu-bar visibility will have the menu
> button available.
> 
> Mike: With that said, is the menu-bar going to be hidden by default on Linux
> with Australis? I think fixing this bug might still be needed.

If this[1] is what it looks like on Fedora by default, then yes, I think hiding the menubar by default (and showing the whole thing with a sole press of Alt) is the right call. That's way too much stuff at the top of the window.

That's my position on the matter, anyhow.

[1]: http://i.imgur.com/ttgXZk3.png
Flags: needinfo?(mconley)
Comment on attachment 789589 [details] [diff] [review]
Firefox-button.patch

(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #11)
> A few comments:
> - XP_UNIX is also defined on OSX
> - do we really need an overlay to do this?

Please address these issues.

> - do we really want to do this now, given that Australis is around the
> corner?

Even with the new Australis menu button, we'll need to make some changes here, so this bug should still get fixed.
Attachment #789589 - Flags: review?(jaws)
(In reply to Jared Wein [:jaws] from comment #16)
> > - do we really want to do this now, given that Australis is around the
> > corner?
> 
> Even with the new Australis menu button, we'll need to make some changes
> here, so this bug should still get fixed.

I don't see how this answers Gavin's question.

The question is whether we should introduce the Firefox button to Linux users only to replace it with the panel menu thingy a few versions later.
(Assignee)

Comment 18

6 years ago
This patch is required also for Australis to hide menubar. Otherwise it is still visible when instance is started with new profile.
Again, that wasn't the question. Anyway, I'll take this as agreement that this should wait for Australis.
Summary: Make application button default on Linux → Hide the menu bar by default on Linux
(Assignee)

Comment 20

6 years ago
Posted patch Firefox-button patch v2 (obsolete) — Splinter Review
Attaching simpler patch without overlaying.
Attachment #789589 - Attachment is obsolete: true
Attachment #793426 - Flags: review?(jaws)
Comment on attachment 793426 [details] [diff] [review]
Firefox-button patch v2

>--- a/browser/base/content/browser.xul
>+++ b/browser/base/content/browser.xul
>@@ -426,16 +426,19 @@
>     <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
>              defaultset="menubar-items"
>              mode="icons" iconsize="small" defaulticonsize="small"
>              lockiconsize="true"
> #ifdef MENUBAR_CAN_AUTOHIDE
>              toolbarname="&menubarCmd.label;"
>              accesskey="&menubarCmd.accesskey;"
> #endif
>+#ifdef XP_LINUX
>+             autohide="true"
>+#endif

Please put these new lines inside the MENUBAR_CAN_AUTOHIDE ifdef (which, unlike XP_LINUX, depends on the toolkit).

>--- a/modules/libpref/src/init/all.js
>+++ b/modules/libpref/src/init/all.js
>@@ -3864,16 +3864,18 @@ pref("print.postscript.print_command", "
> // 2 problems:
> // 1. The non-topmost panel steals focus from its parent window at showing.
> // 2. The parent of non-topmost panel is not activated when the panel is hidden.
> // So, we have no reasons we should use non-toplevel window for popup.
> pref("ui.panel.default_level_parent", true);
> 
> pref("mousewheel.system_scroll_override_on_root_content.enabled", false);
> 
>+pref("ui.key.menuAccessKeyFocuses", true);

It seems like you'll need to update http://mxr.mozilla.org/mozilla-central/source/accessible/tests/mochitest/events/test_focus_general.html?force=1#99 and http://mxr.mozilla.org/mozilla-central/source/accessible/tests/mochitest/events/test_menu.xul#156.
(Assignee)

Comment 22

6 years ago
Thank you for fast review. Attaching patch addressing mentioned stuff.
Attachment #793426 - Attachment is obsolete: true
Attachment #793426 - Flags: review?(jaws)
Attachment #793471 - Flags: review?(dao)
Attachment #793471 - Flags: review?(dao) → review+
Whiteboard: [Australis:P?][Australis:M?]
Dao, is this ready to land on UX?
Assignee: nobody → jhorak
Status: NEW → ASSIGNED
Flags: needinfo?(dao)
Hardware: x86_64 → All
Whiteboard: [Australis:P?][Australis:M?] → [Australis:P3][Australis:M?]
Version: unspecified → Trunk
(In reply to Jared Wein [:jaws] from comment #23)
> Dao, is this ready to land on UX?

Sure.
Flags: needinfo?(dao)
https://hg.mozilla.org/projects/ux/rev/945af538c076
Whiteboard: [Australis:P3][Australis:M?] → [Australis:P3][Australis:M9][fixed-in-ux]

Comment 26

6 years ago
https://hg.mozilla.org/mozilla-central/rev/945af538c076
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [Australis:P3][Australis:M9][fixed-in-ux] → [Australis:P3][Australis:M9]
Target Milestone: --- → Firefox 28

Updated

6 years ago
Blocks: 940228
Depends on: 940669
But you don't use Gnome shell Application menu either.
Depends on: 971011

Updated

5 years ago
Depends on: 1044170

Updated

5 years ago
Duplicate of this bug: 635577
You need to log in before you can comment on or make changes to this bug.