ZaWertun / gtk3-nocsd

A hack to disable gtk+ 3 client side decoration
GNU Lesser General Public License v2.1
53 stars 2 forks source link

Firefox titlebar is shown while it's disabled #12

Closed bbb651 closed 3 years ago

bbb651 commented 3 years ago

When ticking off the Titlebar Bar checkbox in the Customize... page and/or setting browser.tabs.drawInTitlebar to true in about:config, I would expect the title bar to be hidden, and it behaved as expected until I installed this package, now it looks like this:

2021-06-16-142052_1116x131_scrot

Is there any way workaround to hide the title bar? I tried the window specific settings in Plasma but haven't had much luck.

Firefox 89.0 (64-bit), Plasma 5.22.0, kernel version 5.12.9-arch1-1

ZaWertun commented 3 years ago

Try to run Firefox without gtk3-nocsd.

ZaWertun commented 3 years ago

Actually I don't see much sense using gtk3-nocsd with KDE. Breeze theme already have GTK CSD support and it way better than hacks used by gtk3-nocsd.

bbb651 commented 3 years ago

Try to run Firefox without gtk3-nocsd.

How do I exclude apps while having:

export GTK_CSD=0
export LD_PRELOAD=<"full path" of your libgtk3-nocsd.so.0 file>

in my ~/.bashrc? Will unsetting the environment variables in the .desktop file work?

Breeze theme already have GTK CSD support and it way better than hacks used by gtk3-nocsd.

I'm not sure what you mean, I didn't like the way it looked, the window decoration looked like the before screenshot and it now looks like the after screenshot.

P.S. Running it after unsetting the environment variable works, I'm still not sure how to do it automatically.

ZaWertun commented 3 years ago

If you're using gtk3-nocsd script - I could change it this way:

diff --git a/gtk3-nocsd.in b/gtk3-nocsd.in
index 5655e31..a790d71 100644
--- a/gtk3-nocsd.in
+++ b/gtk3-nocsd.in
@@ -75,6 +75,14 @@ fi

# Find the real program (the first one that's not symlinked to get3-nocsd)
APPNAME="$(basename "$0")"
+if [ x"$GTK3_NOCSD_IGNORE" != x ]; then
+    for IGNORE in $(echo "$GTK3_NOCSD_IGNORE" | tr ',' ' '); do
+        if [ x"$IGNORE" = x"$APPNAME" ]; then
+            exec "$0" "$@"
+        fi
+    done
+fi
+
for APPPATH in $(which -a "$APPNAME") /bin/false; do
APPPATH_LINK="$(readlink ${RLINK_ARGS} "$APPPATH")"
[ x"${APPPATH_LINK##*/}"x = x"gtk3-nocsd"x ] || break

Then you could create global variable GTK3_NOCSD_IGNORE=firefox,some_other_app and gtk3-nocsd will skip firefox and some_other_app.

ZaWertun commented 3 years ago

Also try to use branch https://github.com/ZaWertun/gtk3-nocsd/tree/test/libhandy. It's still work in progress but already able to remove extra window buttons for example in gnome-disk-utility-40.1. But still I can't get rid of those black borders: изображение

ZaWertun commented 3 years ago

Should be fixed in 9a72d37c228841fc2c90b3a7ee49a9b448e94796. I've tested it with Firefox-89.0.

bbb651 commented 3 years ago

Thanks! Also I was using the AUR package and I found it's really outdated, last update was on 2019-08-07, so I've removed it and I'll try to build it from source when I have time.