RensAlthuis / vertical-overview

Gnome has had vertically stacked workspaces for a long time. The Gnome 40 update unfortunately made the switch to a horizontal layout. A choice that many Gnome users disagree with. This extension completely replaces the new Gnome overview with something that resembles the old style.
GNU General Public License v3.0
311 stars 30 forks source link

40.4-1 breaks extension #64

Closed ickyicky closed 3 years ago

ickyicky commented 3 years ago

With update to gnome-shell-1:40.4-1 gnome-shell-extensions-40.4-1 vertical-overview breaks on overview (at least on Xorg). Restarting gnome-shell helps untill entering overview again

ickyicky commented 3 years ago
JS ERROR: TypeError: this._skipTaskbarSignals is undefined
_clearSkipTaskbarSignals@resource:///org/gnome/shell/ui/workspace.js:1313:37
prepareToLeaveOverview@resource:///org/gnome/shell/ui/workspace.js:1319:14
prepareToLeaveOverview@resource:///org/gnome/shell/ui/workspacesView.js:410:33
prepareToLeaveOverview@resource:///org/gnome/shell/ui/workspacesView.js:1053:38
animateFromOverview@resource:///org/gnome/shell/ui/overviewControls.js:703:33
animateFromOverview@resource:///org/gnome/shell/ui/overview.js:97:24
_animateNotVisible@resource:///org/gnome/shell/ui/overview.js:601:24
hide@resource:///org/gnome/shell/ui/overview.js:590:14
toggle@resource:///org/gnome/shell/ui/overview.js:636:18
_init/<@resource:///org/gnome/shell/ui/overviewControls.js:435:31

this is the problem

mikeslattery commented 3 years ago

The problem is that the constructor for the workspace object was copy-pasted from gnome-shell. Since then gnome-shell has added _skipTaskbarSignals to the object, but the copy-pasted constructor code doesn't initialize it, of course.

A quick workaround, is to add this to the constructor (untested)

this._skipTaskbarSignals = new Map();
RensAlthuis commented 3 years ago

Thanks for the excellent info 👍. I'm currently on holiday, but I can look at it when I get back. Will probably try to tackle some other issues as well.

sc44 commented 3 years ago

@mikeslattery

A quick workaround, is to add this to the constructor (untested)

this._skipTaskbarSignals = new Map();

Worked, thank you very much.

carlwgeorge commented 3 years ago

at least on Xorg

Confirmed the same behavior on wayland (Fedora 34). Downgrading gnome-shell and mutter to the builds from this update works around the issue.

duartec3000 commented 3 years ago

@mikeslattery

A quick workaround, is to add this to the constructor (untested)

this._skipTaskbarSignals = new Map();

Worked, thank you very much.

Any chance you could show where exactly in the file workspace.js we need to insert this._skipTaskbarSignals = new Map(); for the non well versed in JS?

I understand that it's somewhere inside WorkspaceOverride = { }but I am affraid to break it as I don't know what is allowed in JS.

martin31821 commented 3 years ago

I understand that it's somewhere inside WorkspaceOverride = { }but I am affraid to break it as I don't know what is allowed in JS.

Somewhere in the _init function is sufficient.

duartec3000 commented 3 years ago

I understand that it's somewhere inside WorkspaceOverride = { }but I am affraid to break it as I don't know what is allowed in JS.

Somewhere in the _init function is sufficient.

Many thanks, added and the extension is now working properly again.

meridius commented 3 years ago

I tried to add it on the same place as is in GnomeShell source, but the issue still persists. :disappointed:

robin-a-meade commented 3 years ago

@meridius The workaround discussed here successfully worked on my Fedora 34 installation. You can see my exact change here: https://github.com/robin-a-meade/vertical-overview/commit/e59b5cdeaf6884489729fbeca2ac3bdc65bd9d1a

After the change I did:

sudo dnf remove gnome-shell-extension-vertical-overview # (1)
gnome-extensions uninstall vertical-overview@RensAlthuis.github.com # (2)
make build
make install
gnome-extensions enable vertical-overview@RensAlthuis.github.com

(1) Make sure the system-wide Fedora package is not installed (2) Make sure previous installation is uninstalled

For good measure, log out and back into Gnome Shell.

carlwgeorge commented 3 years ago

Thanks for the example @robin-a-meade. I've generated a patch from that and applied it to the Fedora package. Once this update shows a status of "testing" it can be installed by running dnf --enablerepo updates-testing update gnome-shell-extension-vertical-overview.

Have you considered submitting your patch to this repo as a pull request?

meridius commented 3 years ago

I'm glad that it's working for you on Fedora. It's not for me on Arch, however.

duartec3000 commented 3 years ago

I'm glad that it's working for you on Fedora. It's not for me on Arch, however.

it's working fine on Arch too, please make sure you have inserted the line in the correct function, as an example starting at line 78:

WorkspaceOverride = {
     _init: function (metaWorkspace, monitorIndex, overviewAdjustment) {
         St.Widget.prototype._init.call(this, {
             style_class: 'window-picker',
             pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
             layout_manager: new Clutter.BinLayout(),          
         });

    this._skipTaskbarSignals = new Map()
meridius commented 3 years ago

Thank you for your effort, but I already tried to put it on various rows in the _init of the WorkspaceOverride. Disabled/enabled the extension and restarted Gnome Shell via Alt+F2+r every time; even tried logging out.
I also disabled all other extensions to prevent possible conflicts.

It always hangs in the overview and there are no errors in the Looking Glass.

BTW, you're missing trailing ; in your example.

duartec3000 commented 3 years ago

Well I don't believe in magic and I can assure you it's working fine in Arch updated to latest version today. So, something else is happening with your setup. Let's compare:

I'm using the latest official tagged release of vertical-overview, installed from Gnome Extensions website, not the git package from the AUR.

The file I edited was this one: ~/.local/share/gnome-shell/extensions/vertical-overview@RensAlthuis.github.com/workspace.js and after a restart of the shell even without the trailing ; overview didn't crash anymore.

Have more than 10 other extensions installed but none of them interferes with the overview.

Other than that it's just regular gnome.

meridius commented 3 years ago

Thank you, @duartec3000 for giving me another chance.

I have this project installed via Gnome Extension and I have it cloned in my projects dir too.
The problem was, as you probably guessed by now, that I was editing workspace.js from the cloned repo the whole time. I feel like an idiot now.

I can confirm that the solution works even with all other extensions enabled.

I'll double-check what I'm editing next time.

Thank you again.