poehlerj / no-title-bar

Integrates maximized windows with the top panel
https://extensions.gnome.org/extension/2015/no-title-bar-forked/
GNU General Public License v2.0
67 stars 10 forks source link

Firefox 89 incompatibility #33

Open YueRen opened 3 years ago

YueRen commented 3 years ago

Ubuntu 20.04 user here. Enabling the no-title-bar extension messes with the "Title Bar" option in the newest Firefox 89 ("Title Bar" is a checkbox in bottom left in the "Customize Firefox" tab, which can be opened through "Customize Toolbar" in the toolbar overflow menu):

Previous versions of Firefox worked just fine from my experience (thanks a lot for the extension btw!!!), and this is might very well be a problem in Firefox.

poehlerj commented 3 years ago

It seems like Firefox doesn't set the window's decorated flag correctly. I'm unsure that this hasn't happened somehow on older versions as well. Anyway, there is another way of checking if a window has decorations which I seem to have missed before, so I provided a fix to the master-branch. @YueRen would you mind trying it (checkout master and follow instructions from README)? I myself usually don't use that mode in Firefox, because I don't "need" the Window-Closing-X in the corner, but from where I can tell, this issue should be fixed now.

YueRen commented 3 years ago

Thx for looking into it, Jonas! Unfortunately the commit did not fix the issue, Firefox 89 still behaves the same as before.

poehlerj commented 3 years ago

Ok, I guess there might be some different behaviour with Gnome 3.36 (I was testing with 40). Could you turn on "Debug mode" in the extension settings and then run journalctl -fe | grep "\[no-title-bar]" in a terminal? Then try to focus, unfocus and maximise/minimise the window and post the output here. Maybe we can figure something out that way.

YueRen commented 3 years ago

Sure thing, can you tell me how to turn on debug mode on the terminal? I tried opening the extension settings in the GUI and I get the following error (probably because I originally installed it via the website and then overwrote the installation via the terminal?):

Gtk.BuilderError: /home/ren/.local/share/gnome-shell/extensions/no-title-bar@jonaspoehler.de/Settings.ui:602:43 Invalid property: GtkButton.icon_name

Stack trace:
  buildPrefsWidget@/home/ren/.local/share/gnome-shell/extensions/no-title-bar@jonaspoehler.de/prefs.js:27:15
  _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:207:40
  OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
  asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:132:13
  run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:175:20
  main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
  run@resource:///org/gnome/gjs/modules/script/package.js:222:19
  start@resource:///org/gnome/gjs/modules/script/package.js:206:5
  @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
poehlerj commented 3 years ago

Arrgh... How I hate breaking changes between Gnome-Versions. I usually only release the current version of the extension for the current Gnome-Version, because things change between versions and I am usually only running one version and therefore can only really properly maintain the version I'm currently using. For Gnome 40 I had to rewrite large parts of the settings page, and just earlier today I thought to myself: "Hey Gnome 3.36 is only a year old, what could have possibly broken", so I reactivated the versions 3.36 and 3.38. Turns out: The preferences overhaul broke it now. I will have to find a solution on how to maintain different versions (probably use multiple branches), but for now, you can probably run this to turn on the debug mode (use false, to turn off):

dconf write /org/gnome/shell/extensions/no-title-bar/debug-mode true

After running this command, you should get "Debug mode set to true" in the output of the journal-command I sent you earlier.

YueRen commented 3 years ago

debug.txt

The command for setting debug-mode to true worked nicely, I've attached the ouput of the journalctl line while toggling the option off+on five times. And ouch, I feel your pain with trying to maintain a package for different systems.

TastyPi commented 3 years ago

It seems like Firefox doesn't set the window's decorated flag correctly.

Has anyone filed a bug with Firefox about this? If they fix it then you won't need to do anything.