Closed Bug 1460959 Opened 6 years ago Closed 4 years ago

Disable system titlebar by default on Linux

Categories

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

60 Branch
All
Linux
enhancement

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
relnote-firefox --- -
firefox82 --- fixed

People

(Reporter: joshas, Assigned: stransky)

References

(Blocks 1 open bug)

Details

(Keywords: polish)

Attachments

(7 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180503143129

Steps to reproduce:

Turn off "Title Bar" option in Customize window, on Ubuntu 18.04.


Actual results:

Title bar has white background in top left and right corners.


Expected results:

Top corners should have transparent background.
Severity: normal → trivial
Has STR: --- → yes
Component: Untriaged → Widget: Gtk
Keywords: polish
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → All

In Firefox 75 issue can be fixed by setting "mozilla.widget.use-argb-visuals" preference to True. Any plans to turn it on by default?

Priority: P5 → P3

(In reply to joshas from comment #2)

In Firefox 75 issue can be fixed by setting "mozilla.widget.use-argb-visuals" preference to True. Any plans to turn it on by default?

It causes visual glitches when video is played so we can't enable it - Bug 1516224.

Assignee: nobody → stransky

libyuv library used for software decode UYV video formats to RGB produces also alpha for RGBX formats.
As we use OP_OVER in Basic compositor, the alpha channel is copied to final surface which is sent to window manager.
When alpha X11 visual is used, the bogus alpha information is used for blending and the video is transparent,
co we need to clear the alpha information from the video surface.

In order to hide system titlebar by default we need to use alpha visual for Firefox main window.

Depends on D88558

See Also: → 1516224

Implement nsWindow::IsMainWindowTransparent() as we need that info in BasicCompositor.

Depends on D88560

Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9b0831b5b79d
[Linux] Clear alpha channel from decoded video on BasicCompositor, r=sotaro
https://hg.mozilla.org/integration/autoland/rev/c22047618d6d
[Linux] Use alpha visual for Firefox toplevel window on composited screens, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/2f0cdb92820d
[Linux] Disable titlebar by default when we can paint the titlebar transparent corners, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/bb0078598fc8
[Linux] Implement nsWindow::IsMainWindowTransparent(), r=jhorak
Regressions: 1663171
Blocks: 1663194
Regressions: 1663206

I don't know what that bug is all about, but mozregression lead me here. Title bar on my Linux firefox window gone. See attached before and after screenshots. btw after screen shots seems to grab more than just a window, so may be there is something transparent.

Attached image before.png
Attached image afer.png

EDIT: oh ... I see you decide to disable title bar with some logic. Well ... at least on my Gentoo Linux that seems to disable it without any warning and waste me some time to trying to figure it out what is wrong. Anyway clicking on title bar in customize bring browser back to normal.

Regressions: 1663279

I'm sorry it causes you the troubles. Nightly is expected to come with various changes, I think we ship release notes for Beta/Release only.

Release Note Request (optional, but appreciated)
[Why is this notable]:
[Affects Firefox for Android]:
[Suggested wording]:
[Links (documentation, blog post, etc)]:

Type: defect → enhancement
relnote-firefox: --- → ?
Summary: Custom Title Bar corners are not transparent on Ubuntu 18.04 → Disable system titlebar by default on Linux

Let's wait with the relnotes until Bug 1663279 Bug 1663206 and Bug 1663194 are fixed.

Regressions: 1663194
Regressions: 1663317

Hi, @emilio in Matrix suggested this might be causing the reproducible crash I started experiencing in KDE in bug 1662834 comment 1.

On Linux/KDE with current nightly the windows aren't resizable anymore (next to having no titlebar). Interestingly enough it is also not possible via the context menu in the toolbar, the option is disabled as if that window doesn't allow resizing at all anymore.
An option to get back the title bar is neither visible in "Customize" nor in about:config as far as I could see.

The breakage here is severe enough that Nightly has become unusable (I can't dogfeed it any more - and I don't think I'm the only one). Martin, if you don't think you can get this fixed quickly, we'll have to consider backing out the patches.

Sure, I'm going to look at it today.

(In reply to Arthur from comment #19)

On Linux/KDE with current nightly the windows aren't resizable anymore (next to having no titlebar).
I can resize Firefox's windows with the mouse on all sides in KWin on X11 (xcb) in Fedora 32.

Interestingly enough it is also not possible via the context menu in the toolbar, the option is disabled as if that window doesn't allow resizing at all anymore.
The KWin titlebar menu (Maximize, Move to Screen, Minimize, More Actions, Close ) is gone altogether from Firefox's main window for me: right-clicking just gives me Firefox's tab bar menu. I guess that's what "Disable system titlebar by default on Linux" means.

Bug 1663279 has a patch which fixes all issued on Fedora 32. Please retest when it lands, it's possible that older distros may have some other issues, especially KDE before 5.18.

(In reply to skierpage from comment #22)

The KWin titlebar menu (Maximize, Move to Screen, Minimize, More Actions, Close ) is gone altogether from Firefox's main window for me: right-clicking just gives me Firefox's tab bar menu. I guess that's what "Disable system titlebar by default on Linux" means.

It's question what's the better default for KDE. I checked Chrome and it also has disabled the system titlebar by default there. I'm not a KDE user so I don't have a strong opinion here.

Regressions: 1663273

Bug 1663279 has landed, can you please re-test?
Thanks.

I'm seeing crashes that seem related to this change, like this one for example. I'm hesitant to file a bug because they're coming from a single nightly user, Martin can you have a look?

Flags: needinfo?(stransky)

(In reply to Gabriele Svelto [:gsvelto] (PTO until September 5th) from comment #26)

I'm seeing crashes that seem related to this change, like this one for example. I'm hesitant to file a bug because they're coming from a single nightly user, Martin can you have a look?

Gabrielle, that's very good catch! Please file that one!
Thanks.

Flags: needinfo?(stransky)

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

(In reply to Gabriele Svelto [:gsvelto] (PTO until September 5th) from comment #26)

I'm seeing crashes that seem related to this change, like this one for example. I'm hesitant to file a bug because they're coming from a single nightly user, Martin can you have a look?

Gabrielle, that's very good catch! Please file that one!
Thanks.

I filed it as Bug 1663576, Thanks.

Regressions: 1663576

With 20200909093957 I still don't have title bar and window borders on Debian stable with KDE. Clearing startup cache didn't help, Compositing: WebRender.

(In reply to Arthur from comment #29)

With 20200909093957 I still don't have title bar and window borders on Debian stable with KDE. Clearing startup cache didn't help, Compositing: WebRender.

Okay, let's use Bug 1663273 for that. I guess we end up with disabled hidden titlebar on KDE anyway.

I'm not a KDE user so I don't have a strong opinion here.

I use KDE but I don't have a strong opinion either :-) Currently there's too many regressions from this though. If those can get fixed, testing it would just be a matter of flipping the pref, right?

(In reply to Gian-Carlo Pascutto [:gcp] from comment #31)

I'm not a KDE user so I don't have a strong opinion here.

I use KDE but I don't have a strong opinion either :-) Currently there's too many regressions from this though. If those can get fixed, testing it would just be a matter of flipping the pref, right?

Which one do you mean? I'm aware of Bug 1663273 only which turned out to be independent on the titlebar setting. All others should be settled now.

I'm not clear if the stuff I saw in bug 1663317 has been fully fixed or if it's just gone away because the title bar is back.

KDE >= 5.18 contains Gtk fixes on KDE side which fixes that, see https://pointieststick.com/2019/11/30/this-week-in-kde-gtk-csd-support-and-more/

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

KDE >= 5.18 contains Gtk fixes on KDE side which fixes that, see https://pointieststick.com/2019/11/30/this-week-in-kde-gtk-csd-support-and-more/

Can we check on the KDE version? I don't think people using stable distros are likely to update just for firefox.
Setting MOZ_GTK_TITLEBAR_DECORATION to false fixes my issues with not having window borders, but it's not very user friendly either.

It's not very easy to get exact KDE version. Okay, let's disable the hidden titlebar for KDE by default.

See Also: → 1664496

Release Note Request (optional, but appreciated)
[Why is this notable]: Firefox follows other browsers and hide system titlebar on Gnome by default.
[Affects Firefox for Android]: none
[Suggested wording]:
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
QA Whiteboard: [qa-82b-p2]
Regressions: 1673163

This missed the boat for the Fx82 relnotes.

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

It's not very easy to get exact KDE version. Okay, let's disable the hidden titlebar for KDE by default.

If you need to know plasma version, you could run plasmashell--version.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: