negesti / gnome-shell-extensions-negesti

An gnome-shell extension that makes window movement a lot easier.
GNU General Public License v3.0
287 stars 46 forks source link

Settings dialogue doesn't work on gtk4 / Gnome 40 #191

Closed EdAyers closed 2 months ago

EdAyers commented 3 years ago

This issue stems from #190

Gnome version: 40.0.0 Windowing system: X11 OS: Arch Linux, rolling

There is a problem, the extension itself is working for me but I've discovered the settings dialogue doesn't work

Screenshot from 2021-04-09 11-49-55

Error: Requiring Wnck, version none: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded

Stack trace:
  @/home/edward/.local/share/gnome-shell/extensions/putWindow@clemens.lab21.org/prefs.js:5:14
  _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:206:33
  OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
  asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
  run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
  main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
  run@resource:///org/gnome/gjs/modules/script/package.js:206:19
  start@resource:///org/gnome/gjs/modules/script/package.js:190:8
  @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17

This seems to have come up at #170

But I have installed libwnck3, so I'm not sure what to do.

@negesti replied:

I guess libwnck3 will not work with gtk 4. As i'm on 3.38 i can not really test it, but maybe you can try the current develop version. It should at least not fail on startup

EdAyers commented 3 years ago

It looks like GTK4 makes a lot of non-trivial breaking changes to the API. Sigh.

FWIW I had a quick go at fixing this (hoping it would just be about renaming a few things) but I ran out of steam because there are lots of issues and I am not familiar with GTK and I didn't have a good debug cycle set up. I'll put my post-mortem here in case someone else wants to pick this up.

Some resources which might help someone:

Some specific API breaks for this project (non-exhaustive)

EdAyers commented 3 years ago

Another extension I use is having a similar crisis: https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/issues/672 https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet/pull/678

negesti commented 3 years ago

thanks for looking into this! i will check it once i got enough time to update to Fedora 34

Kerrung commented 3 years ago

thanks for looking into this! i will check it once i got enough time to update to Fedora 34

You can use GNOME OS (Nightly) to start working on it at beta during code freeze: https://os.gnome.org/

negesti commented 3 years ago

@Kerrung thanks for the hint, but that doesn't solve my time problem :)

TheRoarkster commented 3 years ago

Thanks @negesti. This extension is indispensable. Getting it on GNOME 40 -- once you update to Fed 34 -- will be amazing. I have never built an extension, but would be honored to help in any way.

negesti commented 3 years ago

@TheRoarkster The problem "only" affects the settings dialog. As gnome 40 now uses GTK 4 it looks like prefs.js needs a complete re-write :( Port Extensions to GNOME Shell 40

At leasting starting the settings do not require a complete gnome-shell restart (at least it didn't before v40)

gnome-shell-extension-prefs putWindow@clemens.lab21.org
TheRoarkster commented 3 years ago

I'm confused -- it doesn't work at all -- that is, it does not "put" any windows anywhere based on my prior settings -- on my instance of GNOME 40.3 in Manjaro or another instance running on Fedora 34.

I understand you don't have the time to fix -- just wondering if it is currently working (other than settings dialog) for you; that is, the extension loads and puts windows places.

FWIW, I tried launching the settings dialog using the code in your prior post. Here is the error I got:

Error: Requiring Wnck, version none: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded

Stack trace:
  @/home/rsync/.local/share/gnome-shell/extensions/putWindow@clemens.lab21.org/prefs.js:5:14
  _init@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:206:33
  OpenExtensionPrefsAsync/<@resource:///org/gnome/Shell/Extensions/js/extensionsService.js:122:28
  asyncCallback@resource:///org/gnome/gjs/modules/core/overrides/Gio.js:115:22
  run@resource:///org/gnome/Shell/Extensions/js/dbusService.js:177:20
  main@resource:///org/gnome/Shell/Extensions/js/main.js:19:13
  run@resource:///org/gnome/gjs/modules/script/package.js:206:19
  start@resource:///org/gnome/gjs/modules/script/package.js:190:8
  @/usr/share/gnome-shell/org.gnome.Shell.Extensions:1:17
curusarn commented 3 years ago

@TheRoarkster: I can confirm that after upgrading to GNOME Shell 40.3 on Manjaro the extension stopped working for me. Both the setting dialog and the extension itself stopped working.

Btw I only used the extension to shift focus between windows but I have been relying on the functionality heavily. I can't promise anything but I will try to look into making this part of the extension work.

pdecat commented 3 years ago

FWIW, GTK4 migration guide has moved from https://developer.gnome.org/gtk4/4.0/gtk-migrating-3-to-4.html to https://docs.gtk.org/gtk4/migrating-3to4.html

Until the port is implemented, settings can be edited with Dconf Editor:

dconf-editor  /org/gnome/shell/extensions/org-lab21-putwindow/
Dolland commented 2 years ago

FWIW, GTK4 migration guide has moved from https://developer.gnome.org/gtk4/4.0/gtk-migrating-3-to-4.html to https://docs.gtk.org/gtk4/migrating-3to4.html

Until the port is implemented, settings can be edited with Dconf Editor:

dconf-editor  /org/gnome/shell/extensions/org-lab21-putwindow/

It seems i cannot edit settings like that because entry doesn't exist on dconf-editor. Also the extension doesn't work at all. Ubuntu 21.10 GNOME 40.5 Manually copied the extension from git and activated through gnome extensions

negesti commented 2 years ago

Settings can be opened again but I'm really stuck with GTK 4 and the application settings site. Additionally i remove styles/maring/padding as this was changed with 4.0 and the settings really look wired now :(

Hideman85 commented 2 years ago

Subscribing to this feed, I'm looking forward to the fix of this issue :)

negesti commented 2 years ago

Started with the cleanup of the old < 40 code. But the settings panel does really work :/

negesti commented 2 years ago

Current documentation for Extension and migrations guide can be found here https://gjs.guide/extensions/upgrading/gnome-shell-40.html#gtk-accelerator-parse

negesti commented 2 months ago

Closing this, as wnck is no longer required with gnome-shell v46