micheledaros / gnome-shell-extension-simulate-switching-workspaces-on-active-monitor

MIT License
24 stars 4 forks source link

gnome 45 #5

Closed micheledaros closed 9 months ago

Wizzerinus commented 9 months ago

Hiya! There is no issue tracker for this project, so I had to write this on the PR instead.

Due to an internal change in GNOME 45 in how the imports are handled, it is currently not possible to simply mark the extension as being available for 45 as the change is not backwards-compatible: https://gjs.guide/extensions/upgrading/gnome-shell-45.html

While I can fix this myself to work with specifically GNOME 45, I'm not sure what's the best way to write code that works on both 45 and older versions of GNOME since the import methods are very different. Probably would have to make a separate fork unfortunately.

Wizzerinus commented 9 months ago

Update: it seems a lot harder to fix than expected because Main.activateWindow can no longer be overridden with the new import system. I tried to do it myself (https://github.com/Wizzerinus/gnome-shell-extension-simulate-switching-workspaces-on-active-monitor-g45/commit/6f24292a370e87d0a047199dea4ca437d5186285) which made it possible to launch but it is still very buggy, primarily due to _getFocusedMonitor (you can check my comment to that if you want). I am not sure how to write that one properly off the top of my head, although I think the API is there I am not experienced enough with GJS to use it.

micheledaros commented 9 months ago

Hi @Wizzerinus , thanks for having a look.

AFAIK the gnome-extensions site lets users with older versions of gnome can automatically install older versions of the extensions. For this reason I would not mind for code compatibility with gnome < 45.

If you manage to make the extension working, feel free to make a PR, I'll merge it.