mzur / gnome-shell-wsmatrix

GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
GNU General Public License v3.0
464 stars 59 forks source link

Gnome 3.38.0 issues #123

Closed nicjohnston closed 3 years ago

nicjohnston commented 3 years ago

I just updated to Gnome 3.38.0 on Debian Testing and this extension seems to be broken. After re-installing from the git repo, I have the following error in $ journalctl /usr/bin/gnome-shell -b 0:

gnome-shell[2817]: JS ERROR: Extension wsmatrix@martin.zurowietz.de: TypeError: this.workspacesDisplay[prop] is undefined
                                            overrideOriginalProperties/<@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/WorkspacesDisplay>
                                            overrideOriginalProperties@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/WorkspacesDisplayOv>
                                            WorkspacesDisplayOverride@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/WorkspacesDisplayOve>
                                            _activateOverride@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/OverviewOverride.js:79:41
                                            _handleShowOverviewGridChanged@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/OverviewOverrid>
                                            OverviewOverride@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/OverviewOverride.js:21:12
                                            WsMatrixExtension@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/extension.js:15:34
                                            enable@/home/nic/.local/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/extension.js:30:15
                                            _callExtensionEnable@resource:///org/gnome/shell/ui/extensionSystem.js:167:32
                                            loadExtension@resource:///org/gnome/shell/ui/extensionSystem.js:348:26
                                            _loadExtensions/<@resource:///org/gnome/shell/ui/extensionSystem.js:586:18
                                            collectFromDatadirs@resource:///org/gnome/shell/misc/fileUtils.js:27:28
                                            _loadExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:565:19
                                            _enableAllExtensions@resource:///org/gnome/shell/ui/extensionSystem.js:595:18
                                            _sessionUpdated@resource:///org/gnome/shell/ui/extensionSystem.js:626:18
                                            init@resource:///org/gnome/shell/ui/extensionSystem.js:56:14
                                            _initializeUI@resource:///org/gnome/shell/ui/main.js:269:22
                                            start@resource:///org/gnome/shell/ui/main.js:159:5
                                            @<main>:1:47

Thanks for creating this extension, it is a key part of my workflow.

uno20001 commented 3 years ago

I experience the same problem, you can apply this patch to make the extension load:

Patch on top of 9a4d5173e3a1dca0248e964e8566e03998a12664 ```patch diff --git a/wsmatrix@martin.zurowietz.de/WorkspacesDisplayOverride.js b/wsmatrix@martin.zurowietz.de/WorkspacesDisplayOverride.js index e6689cd..7f1cbfa 100644 --- a/wsmatrix@martin.zurowietz.de/WorkspacesDisplayOverride.js +++ b/wsmatrix@martin.zurowietz.de/WorkspacesDisplayOverride.js @@ -7,7 +7,6 @@ var WorkspacesDisplayOverride = class { this.overrideProperties = [ '_onScrollEvent', '_onKeyPressEvent', - '_updateScrollAdjustment', ]; this.workspacesDisplay = workspacesDisplay; this.overrideOriginalProperties(); @@ -19,6 +18,12 @@ var WorkspacesDisplayOverride = class { overrideOriginalProperties() { this.workspacesDisplay._overrideProperties = {}; + + if ('_updateScrollAdjustment' in this.workspacesDisplay) + this.overrideProperties.push('_updateScrollAdjustment'); + else + this.overrideProperties.push('_activeWorkspaceChanged'); + this.overrideProperties.forEach(function (prop) { this.workspacesDisplay._overrideProperties[prop] = this.workspacesDisplay[prop].bind(this.workspacesDisplay); this.workspacesDisplay[prop] = this[prop].bind(this.workspacesDisplay); @@ -98,6 +103,10 @@ var WorkspacesDisplayOverride = class { return Clutter.EVENT_STOP; } + _activeWorkspaceChanged(_wm, _from, to, _direction) { + this._updateScrollAdjustment(to); + } + _updateScrollAdjustment(index) { if (this._gestureActive) return; ```

The reason is this upstream commit that removed the _updateScrollAdjustment function. There are other problems as well, but it seems to more or less work.

mzur commented 3 years ago

@uno20001 Thanks for the patch. Could you please elaborate what other problems you have?

uno20001 commented 3 years ago

It seems the flags argument has been dropped from multiple functions, and that generates warnings:

The _updateWorkspaceActors() function has also been dropped, although I have not identified what the lack of this override manifests in.

In the pop-up with the thumbnails, the indicator is not visible in the first column. But even when it's visible, its position is not quite right, it's very close to the workspace thumbnail to the left - I guess this is why it cannot be seen in the first column.

In the overview, the indicator first jumps to its "original" position (where it would be if the extension wasn't used), and only then jumps to the correct position.

When the workspaces are displayed vertically in the overview ("Show workspace grid in the overview" is off), I cannot scroll with the mouse to the last two workspaces, I cannot scroll past the seventh one. (There are 3x3 workspaces.)

On some workspaces, the thumbnail-less pop-up ("Show workspace thumbnails" is off) is bigger on the first two workspaces than on the others for no apparent reason:

pictures ![wsm1](https://user-images.githubusercontent.com/3854688/95237610-bd159180-0808-11eb-8d14-7ecc7e856443.png) ![wsm2](https://user-images.githubusercontent.com/3854688/95237362-64de8f80-0808-11eb-96fc-4d3c82099ea9.png)
mzur commented 3 years ago

Thanks a lot! We'll need to have a look at these issues.

mzur commented 3 years ago

There is also this ( #124 ):

gnome-shell[2067]: JS WARNING: [/usr/share/gnome-shell/extensions/wsmatrix@martin.zurowietz.de/ThumbnailWsmatrixPopup.js 59]: Too many arguments to method Clutter.Actor.set_allocation: expected 1, got 2
mzur commented 3 years ago

@ebeem Do you remember why there is an override for the _updateScrollAdjustment function? The only difference I can tell is that the override uses duration: 1 instead of duration: WORKSPACE_SWITCH_TIME (250).

Edit: We talked about it here. I couldn't test it then (and now) because animations are disabled in my testing VM. So the override should probalby remain.

aminvakil commented 3 years ago

What do you suggest for people using gnome 3.38?

Upgrade to the new release v4.0.3 or do not upgrade and stick to v4.0.2?

Because aside from https://github.com/mzur/gnome-shell-wsmatrix/issues/124 I can't see any other problem at least on Arch.

mzur commented 3 years ago

I started work on a PR to fix the issues with GNOME 3.38 and will be published as a new major version of this extension ( #125 ).

@aminvakil You are welcome to use the gnome-3.38 branch and test the fixes. The issue you have reported should already be fixed there.

@uno20001 These two of you reported issues are unrelated to the switch to GNOME 3.38 and already present in earlier versions:

I'll open separate issues for these (#126, #127).

Regarding the following issue, I'm not sure if this is related to the switch to GNOME 3.38:

Maybe it is already resolved with the change to WorkspacesDisplayOverride in the gnome-3.38 branch. But maybe it is unrelated to GNOME 3.38 (@ebeem?).

uno20001 commented 3 years ago

Regarding the following issue, I'm not sure if this is related to the switch to GNOME 3.38::

  • In the overview, the indicator first jumps to its "original" position (where it would be if the extension wasn't used), and only then jumps to the correct position.

@mzur I'm not sure either, but I don't recall having this behaviour on Gnome 3.36.1.

aminvakil commented 3 years ago

I have updated to https://github.com/mzur/gnome-shell-wsmatrix/releases/tag/v5.0.0-beta and the issue (#124) that I have been reported has been successfully fixed, also I can't see any other problem, please let me know if you wanted to test the extension in any specific circumstances.

mzur commented 3 years ago

@aminvakil There are still a few issues that should be sorted out in #125. Feel free to help there if you like.

mzur commented 3 years ago

Closing this in favor of #125.