Open Bug 1670823 Opened 4 years ago Updated 11 months ago

Fix unexpected blank title bar issue on Chromebook devices

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 81
defect

Tracking

()

UNCONFIRMED

People

(Reporter: bradpeddigrew, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; CrOS x86_64 13421.53.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.77 Safari/537.36

Steps to reproduce:

Install the Firefox desktop app for Linux on a Chromebook. The title bar is annoyingly bright and thick, and not integrated into the tab bar like on other platforms.

Actual results:

For Linux apps running in the Crostoni container, ChromeOS renders the title bar of application. The title bar rendered by ChromeOS is a thick white bar that does not even contain the title. In short it is ugly (doesn't match rest of the Firefox GUI), takes screen real estate, and annoyingly bright at night. It very clearly makes Firefox seem like a second class browser when used on a Chromebook.

Other apps like VSCode are able to work around this with a "Title bar style" setting that can be either "Native" or "Custom".

Expected results:

There should be an option to have Firefox render a title bar that matches the rest of the Firefox UI. Preferably, the Minimize, Maximize, Close buttons would be integrated into the tab bar like on Chrome or Firefox for Windows.

Note that the "Title Bar" checkbox in the bottom left of the Customize tab is not visible by default on Chromebooks. It only showed up after I manually added "ui.GtkCSDAvailable" to about:config with a value of "1". But still, checking or un-checking it had no impact even after re-starting Firefox.

Hi! I don't have the hardware to replicate this on my end so I will move this over to a component to have a starting point for this.
If it is not the correct component please feel free to change it to an appropriate one.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Please attach output of 'env | grep XDG' terminal command.
Thanks.

Blocks: gtktitlebar
Flags: needinfo?(bradpeddigrew)

Also please run on terminal:

MOZ_GTK_TITLEBAR_DECORATION=client firefox

and

MOZ_GTK_TITLEBAR_DECORATION=system firefox

and in both cases try to disable titlebar at Customize menu (please remove the ui.GtkCSDAvailable hack). Check if the titlebar is hidden in any case.

(In reply to Martin Stránský [:stransky] from comment #3)

Please attach output of 'env | grep XDG' terminal command.
Thanks.

brad@penguin:~$ env | grep XDG
XDG_CONFIG_HOME=/home/brad/.config
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/home/brad/.local/share:/home/brad/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop

Flags: needinfo?(bradpeddigrew)

(In reply to Martin Stránský [:stransky] from comment #4)

Also please run on terminal:
MOZ_GTK_TITLEBAR_DECORATION=client firefox
and
MOZ_GTK_TITLEBAR_DECORATION=system firefox
and in both cases try to disable titlebar at Customize menu (please remove the ui.GtkCSDAvailable hack). Check if the titlebar is hidden in any case.

I removed the GTK hack and tried both of these settings. But each time when I opened Firefox I could not find any option to disable the titlebar (I didn't see a checkbox like with the GTK hack and din't find it under Toolbars).

brad@penguin:$ MOZ_GTK_TITLEBAR_DECORATION=client firefox
-bash: firefox: command not found
brad@penguin:
$ MOZ_GTK_TITLEBAR_DECORATION="client firefox" // seems quotes are needed
-bash: MOZ_GTK_TITLEBAR_DECORATION: command not found // anyway to check the setting stuck?
brad@penguin:$
brad@penguin:
$ MOZ_GTK_TITLEBAR_DECORATION="system firefox"

$ MOZ_GTK_TITLEBAR_DECORATION=client firefox is a correct command, looks like you don't have firefox installed system wide. Do you use Firefox from flatpak or do you have it installed in a custom local directory?

Flags: needinfo?(bradpeddigrew)

(In reply to Martin Stránský [:stransky] from comment #7)

$ MOZ_GTK_TITLEBAR_DECORATION=client firefox is a correct command, looks like you don't have firefox installed system wide. Do you use Firefox from flatpak or do you have it installed in a custom local directory?

I used the "Manual method" to install it to /home/brad/firefox/ as described here:
https://old.reddit.com/r/Crostini/wiki/howto/install-firefox-quantum
(I avoid the flatpak since I wasn't sure about the unofficial repo)

So I updated the command to use the full path to firefox:
MOZ_GTK_TITLEBAR_DECORATION=client /home/brad/firefox/firefox

I see a Title Bar checkbox and it works! I tried both commands and it works for both. I think I can update my firefox.desktop to get this experience by default. Thank you!

Now the remaining minor issue is that the Minimize/Restore/Close buttons are not shown in the upper right, it is just blank space. But if you hover the cursor there the hover text will appear, and if you click the blank space, the function mentioned in the hover text works as expected.

Flags: needinfo?(bradpeddigrew)

Hi, did you manage to work out how to modify firefox.desktop?
I've managed to manually create a new one pointing to the fire executable with a different icon - just to see it I can. But when I try to incorporate the new command, nothing...

See https://askubuntu.com/questions/144968/set-variable-in-desktop-file
Exec=env MOZ_GTK_TITLEBAR_DECORATION=client /path/to/firefox

I have the same issue of missing window decorations (minimise/maximize/close). As with Comment 8 , the decorations seem to be in place (clickable) but are invisible. I'm using Firefox on a Chromebook, with Wayland enabled and title bar disabled. Setting MOZ_GTK_TITLEBAR_DECORATION=client makes no difference.

XDG envs:

XDG_CONFIG_HOME=/home/rob/.config
XDG_RUNTIME_DIR=/run/user/1000
XDG_DATA_DIRS=/home/rob/.local/share:/home/rob/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share

MOZ envs:

MOZ_ENABLE_WAYLAND=1
Severity: -- → S4
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: