Closed Bug 1462227 Opened 6 years ago Closed 6 years ago

CSD titlebar rendering mode not enabled on Deepin desktop

Categories

(Core :: Widget: Gtk, defect)

61 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: wzc782970009, Assigned: stransky)

References

(Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce:

Simply open firefox on Deepin desktop (Deepin Desktop Enviroment)


Actual results:

CSD titlebar rendering mode not enabled, we can only see a normal titlebar.


Expected results:

CSD titlebar rendering mode should be enabled.

When launching firefox with the firefox.desktop file set as `Exec=env XDG_CURRENT_DESKTOP=GNOME /usr/lib/firefox/firefox %u`, the it works fine.

The XDG_CURRENT_DESKTOP is set as "Deepin" on Linux Deepin.

$ env | grep XDG_CURRENT_DESKTOP
XDG_CURRENT_DESKTOP=Deepin

So it seems we should add a line at https://hg.mozilla.org/mozilla-central/file/93443d36d4bd/widget/gtk/nsWindow.cpp#l7052 and check the `currentDesktop` value is "Deepin" or not.

Possible fix (untested, the bootstrap.py script for quick building firefox locally seems doesn't support this distro neither):

// Deepin Desktop Enviroment
} else if (strstr(currentDesktop, "Deepin") != nullptr) {
            sCSDSupportLevel = CSD_SUPPORT_SYSTEM;
Blocks: gtktitlebar
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Hardware: Unspecified → x86_64
Assignee: nobody → stransky
Status: UNCONFIRMED → NEW
Ever confirmed: true
You can easily enable the titlebar by setting MOZ_GTK_TITLEBAR_DECORATION env value to "system" or "client" where "system" would be more suitable for you as it uses window manager decorations.
(In reply to Martin Stránský [:stransky] from comment #2)
> You can easily enable the titlebar by setting MOZ_GTK_TITLEBAR_DECORATION
> env value to "system" or "client" where "system" would be more suitable for
> you as it uses window manager decorations.

Yeah that works, but since Firefox itself got other DE's built-in support, adding support for a Deepin Desktop Enviroment (DDE) is also a good idea imo.

xdg-utils provided by freedesktop is already support DDE (https://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-utils-common.in#n292 ), if firefox got it's built-in support, users who are using Linux Deepin or other distro with DDE support can use firefox's CSD titlebar out-of-the-box.
Comment on attachment 9003781 [details]
Bug 1462227 - Enable hiding system titlebar on Deepin desktop, r=jhorak

Jan Horak [:jhorak] has approved the revision.
Attachment #9003781 - Flags: review+
Pushed by ebalazs@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c3a7f10f4e35
Enable hiding system titlebar on Deepin desktop, r=jhorak
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c3a7f10f4e35
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
thanks 
this worked for me for deepin desktop on deepin os and manjaro_deepin
Regressions: 1606791
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: