lah7 / gtk3-classic

Patches to bring back a traditional experience for GTK+3
Other
338 stars 24 forks source link

Firefox 112+ shows double minimize/maximize/close buttons #102

Closed fulalas closed 1 year ago

fulalas commented 1 year ago

gtk3-classic: classic

gtk3 original: original

I know there's a Firefox css tweak, but still...

lah7 commented 1 year ago

I believe this is expected behaviour, similar to #32. Firefox probably renders these controls in a way that GTK 3 can't patch. There are 2 solutions:

  1. Tell Firefox to use the window title bar by right clicking the tab bar → "Customise Toolbar..." and then checking "Title Bar" in the bottom-left:

    Screenshot_20230809_205805

  2. Otherwise, the patched GTK can use the original behaviour (show CSDs) by adding GTK_CSD=0 to the start of the command in the desktop launcher for Firefox, depending on your desktop environment. For example:

    GTK_CSD=0 /usr/lib/firefox/firefox %u

fulalas commented 1 year ago

I see. Does @ZaWertun repository still fix this issue?

lah7 commented 1 year ago

Checked it out of curiously. Yes, that works too (against regular GTK 3), but it's essentially solution 1 above by forcing the title bar (with the checkbox disappearing)

gtk3 (title bar off, default) gtk3 (title bar on) gtk3-nocsd (title bar forced on)
Screenshot_20230811_215603 Screenshot_20230811_215606 Screenshot_20230811_215548

In contrast, gtk3-classic shows the window borders regardless of what the application says (hence double controls), so checking "Title Bar" would be the easiest fix.

gtk3-classic (default) gtk3-classic (title bar on) gtk3-classic (GTK_CSD=0) gtk3-classic (GTK_CSD=1)
Screenshot_20230811_220401 Screenshot_20230811_220408 Screenshot_20230811_220625 Screenshot_20230811_221651

Turns out that Firefox recognises GTK_CSD=0 in their code which forces the title bar on (like gtk3-nocsd), even under normal gtk3. So, if you really wanted the default behaviour under gtk3-classic, you'd actually set it to GTK_CSD=1 (or anything not 0)

fulalas commented 1 year ago

Awesome! Thanks a lot! :)