Open Bug 1681356 Opened 3 years ago Updated 1 year ago

firefox cannot disable title bar with xfwm4 window manager, chromium can.

Categories

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

Firefox 83
enhancement

Tracking

()

REOPENED

People

(Reporter: adjam, Assigned: stransky)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(3 files, 2 obsolete files)

Attached image firefox_xfwm4_bug.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Steps to reproduce:

Try to disable window title bar on firefox using xfwm4 window manager. Title bar is not hidden.
In the same configuration (X11 + xfwm4) chromium can disable it

Actual results:

Title bar is not disabled as it should be

Expected results:

Title bar not drawn over firefox

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3

it works for me with MOZ_GTK_TITLEBAR_DECORATION=client.
Thank you very much

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(adjam)
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---

I think we can use MOZ_GTK_TITLEBAR_DECORATION=client as a default fallback when DE type can't be detected from XDG variables.

Assignee: nobody → stransky
Type: defect → enhancement
  • Use different titlebar decoration setup for toplevel windows and popup windows.
  • Use default CSD (client side decoration) mode when we can't get window manager name.
  • Rename GetSystemCSDSupportLevel() to GetToplevelWindowDecoration()
  • Rename CSD_SUPPORT_* to GTK_* decoration setup constants.
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/d7c59b738279
[Linux] Fix titlebar setup for popup windows and use default CSD titlebar mode, r=jhorak
Flags: needinfo?(stransky)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:stransky, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(stransky)
Attachment #9192208 - Attachment is obsolete: true
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/4ccdf47da4fe
[Linux] Draw to MozContainer by default and enable CSD titlebar mode when XDG_CURRENT_DESKTOP is not set, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/4e9bbfd484fb
[Linux] Rename CSDSupportLevel to GtkWindowDecoration, r=jhorak

Backed out for failures on browser_UsageTelemetry_toolbars.js

backout: https://hg.mozilla.org/integration/autoland/rev/668376949c26fc346f02e74a40836ad999172dc4

push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=4e9bbfd484fb124b933370ef63d3c73cca7242b2&searchStr=browser-chrome&selectedTaskRun=XXdN0XM_SDyM-dSnl816cw.0

failure log: https://treeherder.mozilla.org/logviewer?job_id=329754908&repo=autoland&lineNumber=6172

[task 2021-02-12T09:44:47.057Z] 09:44:47 INFO - TEST-PASS | browser/modules/test/browser/browser_UsageTelemetry_toolbars.js | Expected to see see scalar key menubar-items_pinned_menu-bar be true. - true == true -
[task 2021-02-12T09:44:47.058Z] 09:44:47 INFO - Buffered messages finished
[task 2021-02-12T09:44:47.063Z] 09:44:47 INFO - TEST-UNEXPECTED-FAIL | browser/modules/test/browser/browser_UsageTelemetry_toolbars.js | Test timed out -
[task 2021-02-12T09:44:47.064Z] 09:44:47 INFO - GECKO(1527) | JavaScript error: resource:///modules/BrowserUsageTelemetry.jsm, line 506: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - Console message: [JavaScript Error: "NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]" {file: "resource:///modules/BrowserUsageTelemetry.jsm" line: 506}]
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - observe@resource:///modules/BrowserUsageTelemetry.jsm:506:30
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - _resetUIState@resource:///modules/CustomizableUI.jsm:3120:20
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - reset@resource:///modules/CustomizableUI.jsm:3074:10
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - reset@resource:///modules/CustomizableUI.jsm:4181:28
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - @chrome://mochitests/content/browser/browser/modules/test/browser/browser_UsageTelemetry_toolbars.js:29:18
[task 2021-02-12T09:44:47.065Z] 09:44:47 INFO - nextTest@chrome://mochikit/content/browser-test.js:571:35
[task 2021-02-12T09:44:47.066Z] 09:44:47 INFO - timeoutFn@chrome://mochikit/content/browser-test.js:1214:18
[task 2021-02-12T09:44:47.066Z] 09:44:47 INFO -
[task 2021-02-12T09:44:47.066Z] 09:44:47 INFO - GECKO(1527) | MEMORY STAT | vsize 3804MB | residentFast 432MB | heapAllocated 129MB
[task 2021-02-12T09:44:47.066Z] 09:44:47 INFO - TEST-OK | browser/modules/test/browser/browser_UsageTelemetry_toolbars.js | took 91197ms

Flags: needinfo?(stransky)

Bug 1692459 and bug 1692458 might be regressions from these patches. Both bugs hit several failures on Linux while the changes were applied.

Regressions: 1692459, 1692458

The telemetry toolbar crashes even without the patch here, it crashes because of:

ENSURE_PARENT_PROCESS("ClearUser", aPrefName);

at Preferences::ClearUser().

bt:
0:47.73 GECKO(115407) #01: mozilla::Preferences::ClearUser(char const*) (/raid/src/modules/libpref/Preferences.cpp:4902)
0:47.73 GECKO(115407) #02: nsPrefBranch::ClearUserPref(char const*) (/raid/src/modules/libpref/Preferences.cpp:2469)
0:47.73 GECKO(115407) #03: mozilla::Preferences::ClearUserPref(char const*) (/raid/src/objdir/dist/include/mozilla/Preferences.h:100)
0:47.73 GECKO(115407) #04: ??? (/raid/src/objdir/dist/bin/libxul.so + 0x998cf7a)
0:47.73 GECKO(115407) #05: CallMethodHelper::Invoke() (/raid/src/js/xpconnect/src/XPCWrappedNative.cpp:1623)
0:47.73 GECKO(115407) #06: CallMethodHelper::Call() (/raid/src/js/xpconnect/src/XPCWrappedNative.cpp:1176)
0:47.73 GECKO(115407) #07: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) (/raid/src/js/xpconnect/src/XPCWrappedNative.cpp:1142)
0:47.73 GECKO(115407) #08: XPC_WN_CallMethod(JSContext*, unsigned int, JS::Value*) (/raid/src/js/xpconnect/src/XPCWrappedNativeJSOps.cpp:925)
0:47.73 GECKO(115407) #09: CallJSNative(JSContext*, bool ()(JSContext, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) (/raid/src/js/src/vm/Interpreter.cpp:435)
0:47.73 GECKO(115407) #10: js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) (/raid/src/js/src/vm/Interpreter.cpp:520)
0:47.73 GECKO(115407) #11: InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) (/raid/src/js/src/vm/Interpreter.cpp:580)
0:47.73 GECKO(115407) #12: js::CallFromStack(JSContext*, JS::CallArgs const&) (/raid/src/js/src/vm/Interpreter.cpp:584)
0:47.73 GECKO(115407) #13: Interpret(JSContext*, js::RunState&) (/raid/src/js/src/vm/Interpreter.cpp:3243)
0:47.73 GECKO(115407) #14: js::RunScript(JSContext*, js::RunState&) (/raid/src/js/src/vm/Interpreter.cpp:405)

Flags: needinfo?(stransky)

It's here:

[Child 123743, Main Thread] ###!!! ASSERTION: ENSURE_PARENT_PROCESS: called ClearUser on messaging-system.syncdatastore.data in a non-parent process: 'Error', file /raid/src/modules/libpref/Preferences.cpp:4904

This seems to be JS stack for it:
5:15.29 GECKO(135550) 0 anonymous() ["resource://messaging-system/experiments/ExperimentStore.jsm":37:19]
5:15.29 GECKO(135550) 1 get() ["resource://gre/modules/XPCOMUtils.jsm":58:50]
5:15.29 GECKO(135550) <failed to get 'this' value>
5:15.29 GECKO(135550) 2 getExperimentForFeature(featureId = ""aboutwelcome"") ["resource://messaging-system/experiments/ExperimentStore.jsm":91:0]
5:15.29 GECKO(135550) this = [object Object]
5:15.29 GECKO(135550) 3 activateBranch((destructured parameter) = "[object Object]") ["resource://messaging-system/experiments/ExperimentAPI.jsm":168:33]
5:15.29 GECKO(135550) this = [object Object]
5:15.29 GECKO(135550) 4 isEnabled((destructured parameter) = "[object Object]") ["resource://messaging-system/experiments/ExperimentAPI.jsm":355:33]
5:15.29 GECKO(135550) this = [object Object]
5:15.30 GECKO(135550) 5 handleEvent(event = [cross-compartment wrapper]) ["resource:///actors/AboutNewTabChild.jsm":41:28]
5:15.30 GECKO(135550) this = [object JSWindowActorChild]

Filed the browser_UsageTelemetry_toolbars.js fauilure as Bug 1693071. It's not related to the changes here.

See Also: → 1693071

I'll look at the Bug 1692459 and bug 1692458 if I can reproduce it with the patches above.

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/f0ac6e48324a
[Linux] Draw to MozContainer by default and enable CSD titlebar mode when XDG_CURRENT_DESKTOP is not set, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/d6388772d4c6
[Linux] Rename CSDSupportLevel to GtkWindowDecoration, r=jhorak
Regressions: 1693460
Attachment #9208645 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: