Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let's support FF's client side decoration #198

Open
kn00tcn opened this issue Dec 3, 2017 · 13 comments
Open

let's support FF's client side decoration #198

kn00tcn opened this issue Dec 3, 2017 · 13 comments

Comments

@kn00tcn
Copy link

kn00tcn commented Dec 3, 2017

firefox on fedora has enabled widget.allow-client-side-decoration which lets it display without window decorations, i think it's coming soon to other distros & stable eventually

however it appears there is still an empty area above the tabs, adwaita theme does it as well as seen that screenshot from the reddit link, so it's not exactly something mate did wrong

what's interesting is https://github.com/horst3180/arc-theme/ doesnt have the empty space, even though it hasnt been updated in a while, but the window buttons are closer to the top than other gnome based windows (whatever those are called where the OS window decorator isnt used, like yumex-dnf or disks)

this makes me think we can simply target only the FF windows to remove the top, maybe also add margin/padding to the buttons so they're in the correct position

(my 'urgency' comes from moving to a 1080p monitor from 1200p, now youtube wont display the 1280x720 viewport unless i F11 the browser or remove the OS panel, meanwhile windows is fine since the browser doesnt have a titlebar taking up vertical space.... YT's breakpoint is too early, but i doubt they'll change it)

(edit: raveit65, i still owe you the gtk2 padding updates)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@raveit65
Copy link
Member

raveit65 commented Dec 3, 2017

With BlueMenta:
firefox
How should that work it marco WM is running?

@raveit65
Copy link
Member

raveit65 commented Dec 3, 2017

(edit: raveit65, i still owe you the gtk2 padding updates)

Which padding updates for gtk2?

@raveit65
Copy link
Member

raveit65 commented Dec 3, 2017

Same with metacity or mutter WM runing.
firefox-metacity

@kn00tcn
Copy link
Author

kn00tcn commented Dec 4, 2017

the window decorator is not supposed to decorate FF if this option is enabled as seen in the reddit link (whatever gnome3's wm is?)

for me, compiz/emerald already does this without me blacklisting it or any manual interaction

the end result would be like that gtk3/gnome conf window you have on your last screenshot, which is overriding your wm's decorator

screenshot_2017-12-03_19-01-21

screenshot_2017-12-03_19-02-22

upon further testing, it seems only maximized window with arc theme correctly lacks the top space, which appears to bug out & show for a few miliseconds right after maximizing...

screenshot_2017-12-03_19-03-58

screenshot_2017-12-03_19-04-08

anyway as mentioned, the FF option isnt officially 'live' yet, it's in the beta or alpha builds, but for whatever reason fedora maintainers compiled with the ability to manually enable it on stable, which makes it easier to prepare for the change rather than being caught with user complaints in a few months

(the updates i owe you were to make gtk2 more consistent with gtk3 by increasing gtk2's padding on menus/input fields/tooltips to match what you & others have done on gtk3)

@lukefromdc
Copy link
Member

lukefromdc commented Dec 4, 2017

While I do not have and cannot test Firefox with CSD enabled, the CSD window borders in the images above are not that difficult to theme. In https://github.com/lukefromdc/gtk-theme-ubuntustudio-legacy I used screenshot images of portions of the metacity theme to set up the background for a reasonably close window decoration drawn by GTK when a header bar is NOT used, and a header bar that is stylisticly similar to the Metacity theme. If you try this theme and change the window manager to Metacity, then open a mate application and a GNOME application side by side, you will see the results. Then look in window-controls.css to see how it was done

EDIT: I am not sure whether Firefox will follow the header-bar or non header-bar(but GTK drawn) decoration theme

@raveit65
Copy link
Member

raveit65 commented Dec 4, 2017

the window decorator is not supposed to decorate FF if this option is enabled as seen in the reddit link (whatever gnome3's wm is?)

This is mutter WM.

the end result would be like that gtk3/gnome conf window you have on your last screenshot, which is overriding your wm's decorator

On my last screenshoot with 'mutter' or 'metacity' there are two areas of buttons from two decorators :-)

@raveit65
Copy link
Member

raveit65 commented Dec 4, 2017

Please provide screenshots with MATE and not with xfce (config app) desktop.
My results with MATE session in fedora 26:

  • arc theme with marco WM
    firefox-arc-marco
  • arc theme with compiz-reloaded gtk decorator
    firefox-arc-compiz-gtk
  • arc theme with compiz reloaded emerald decorator
    firefox-arc-compiz-emerald

As you can see in all WMs there are 2 button areas.
I like to support this, but again, how should that work with running decorator from marco/metacity or compiz-reloaded?

@raveit65
Copy link
Member

raveit65 commented Dec 4, 2017

What you see in https://www.reddit.com/r/linux/comments/7dre58/you_can_enable_client_side_decoration_in_firefox/
is gnome3 session.
They don't have a runing window decorator any more.
They have only client-side-decoration or server-side-decoration.
If an application use csd than ssd is disabled.
For this reason you don't see double decoration area in their screenshot.
So, this firefox feature is designed for gnome-shell only.

@lukefromdc
Copy link
Member

Even the earliest versions of Chromium were able to ask for an undecorated window and apply their own version of CSD and a CSD theme way back in 2009. Why would Firefox design this as a gnome-shell only feature (maybe also supported in Mutter?) unless it has just plain gotten too complex any other way? Chromium is open source and they could re-use that code.

@kn00tcn
Copy link
Author

kn00tcn commented Dec 5, 2017

They don't have a runing window decorator any more. They have only client-side-decoration or server-side-decoration.

if they didnt have a decorator, wouldnt that break just about every other non-gnome app?

right now i'm thinking FF doesnt have all the right code in place, given that chromium does it fine & those gnome3 specific apps do it fine (it meaning telling the wm to not add a decorator)

just tried mate-compiz-emerald & mate-marco, double buttons yes... so weird, i havent done anything different to compiz, yet xfce-compiz-emerald is able to not add the decoration, xfce's native wm also is capable

i guess we can wait for now, i hope to later hear news about best practices or other guidance from mozilla or something

EDIT: in FF->customize, there is an option for 'drag space', on windows i noticed it adds a similarly sized space as these linux screenshots, but on linux nothing happens when toggling that option...

btw, what bothers me when turning it on is that i lose the several pixels large window border i chose in emerald, partly for visual reasons, but mainly for the mouse click area... i noticed those gnome3/gtk3 apps (gconf, disks, yumex-dnf, etc) have a large transparent click area the way it should be, but traditional linux window managers/apps are based on the visual border, making it very frustrating to try to resize a window with a 1px border

i dont even want this feature for windowed that much, only need it for maximized...

or how about youtube let me force the 1280x720 viewport so i wouldn't be needing all these workarounds to give me more vertical height!

@SecT0uch
Copy link

SecT0uch commented Nov 2, 2018

With Firefox 63, the checkbox "Title bar" under Customize allow to hide it.
My problem is the icons (min, max, close) are those from the Menta theme, when I'm using Icy-Dark theme.

@milouse
Copy link

milouse commented Aug 16, 2019

I think you are speaking about the config option dom.disable_window_open_feature.titlebar in Firefox. As I don't have the widget.allow-client-side-decoration option yet, I cannot test the combination of both of them. Can anyone check if it do the thing?

Sorry I was wrong about it. It seems however that the widget.allow-client-side-decoration has been renamed browser.tabs.drawInTitlebar.

@lukefromdc
Copy link
Member

lukefromdc commented Aug 16, 2019

BTW, you might be able to block Youtube from getting your screen resolution or even spoof it to whatever you want with browser plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants