Go to file
Carlos Garnacho 7095ef05e1 workspacesView: Skip relayouts during destruction
The WorkspacesView may be scheduled to be destroyed during
relayout, and despite that go through the allocate() vfunc.
When that happens, the ::destroy handler is called early,
so the WorkspacesView clears this._workspaces in result.
When vfunc_allocate() is called, various paths rely on the
workspaces array being still populated, which is not the
case.

The existing check at vfunc_allocate() for the WorkspacesView
having no children is insufficient, since children are destroyed
as a result, not beforehand.

This results in the following warnings when going out of
overview:

JS ERROR: TypeError: workspace is undefined
_getSpacing@resource:///org/gnome/shell/ui/workspacesView.js:218:13
vfunc_allocate@resource:///org/gnome/shell/ui/workspacesView.js:344:18
vfunc_allocate@resource:///org/gnome/shell/ui/overviewControls.js:223:33
removeWindow@resource:///org/gnome/shell/ui/workspace.js:856:29
addWindow/<.destroyId<@resource:///org/gnome/shell/ui/workspace.js:808:22
_updateWorkspacesViews@resource:///org/gnome/shell/ui/workspacesView.js:1023:38
prepareToEnterOverview@resource:///org/gnome/shell/ui/workspacesView.js:990:14
prepareToEnterOverview@resource:///org/gnome/shell/ui/overviewControls.js:740:33
gestureBegin@resource:///org/gnome/shell/ui/overviewControls.js:802:14
_gestureBegin@resource:///org/gnome/shell/ui/overview.js:409:33
_beginGesture@resource:///org/gnome/shell/ui/swipeTracker.js:601:14
_handleEvent@resource:///org/gnome/shell/ui/swipeTracker.js:173:26
@resource:///org/gnome/shell/ui/init.js:21:20

This always happens through the _updateWorkspacesViews() paths, so there
is a new WorkspacesView taking over and the one being destroyed should
silently go away.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6935
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2918>
2023-08-29 18:35:26 +00:00
.gitlab/issue_templates gitlab: Add a comment about disabling extension to the issue template 2022-12-15 19:07:08 +00:00
.gitlab-ci ci: Include .desktop files in POTFILES check 2023-08-22 00:16:52 +00:00
.settings Clean out some eclipse artefacts 2019-02-13 04:39:26 +01:00
data theme: Use insensitive theming for undecorated insensitive buttons 2023-08-29 12:02:51 +00:00
docs/reference docs: Remove invalid XInclude 2023-04-24 10:55:40 +08:00
js workspacesView: Skip relayouts during destruction 2023-08-29 18:35:26 +00:00
lint lint: Remove legacy config 2023-08-09 15:10:38 +00:00
man man: Update options 2020-12-28 02:25:17 +01:00
meson theme: Include both dark and light variant in resource 2023-05-25 17:10:53 +02:00
po Updated Spanish translation 2023-08-28 11:27:45 +02:00
src st/scroll-view: Fix issue in st_scroll_view_scroll_event() 2023-08-29 13:25:54 +02:00
subprojects extensions-tool/create: Optionally include prefs 2023-08-26 17:10:28 +00:00
tests tests/unit: Access shell sources from resource 2023-08-10 17:42:23 +00:00
tools tools/create-toolbox: Allow setting up support for GNOME Classic 2023-05-16 18:20:42 +00:00
.eslintrc.yml js: Port to modules 2023-08-06 13:02:49 +02:00
.gitignore ci: Simplify run-eslint script 2023-08-09 15:10:38 +00:00
.gitlab-ci.yml ci: Rebase js image to F39 2023-08-26 18:03:25 +00:00
.gitmodules git: Always use libgnome-volume-control submodule from GNOME group 2022-08-04 18:31:16 +02:00
.jscheckignore ci: Don't ignore init.js 2023-04-21 18:28:32 +00:00
config.h.meson shell: Add device monitor for cameras 2023-07-29 13:55:15 +03:00
COPYING Changed obsolete FSF postal address. 2014-01-08 04:35:14 +07:00
gnome-shell.doap gnome-shell.doap: Make marge-bot a maintainer 2020-11-17 17:29:56 +00:00
HACKING.md docs: Use ESM in HACKING guide 2023-08-07 19:05:50 +00:00
meson_options.txt shell: Add device monitor for cameras 2023-07-29 13:55:15 +03:00
meson.build Bump version to 45.beta.1 2023-08-11 01:22:08 +02:00
NEWS Bump version to 45.beta.1 2023-08-11 01:22:08 +02:00
README.md doc: Update contribution section 2022-12-06 01:49:24 +01:00

GNOME Shell

GNOME Shell provides core user interface functions for the GNOME desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.

For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.

Bugs should be reported to the GNOME bug tracking system. Please refer to the Schedule wiki page to see the supported versions.

Contributing

To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.

Commit messages should follow the GNOME commit message guidelines. If a merge request fixes an existing issue, it is good practice to append the full issue URL to each commit message. Try to always prefix commit subjects with a relevant topic, such as panel: or status/network:, and it's always better to write too much in the commit message body than too little.

Default branch

The default development branch is main. If you still have a local checkout under the old name, use:

git checkout master
git branch -m master main
git fetch
git branch --unset-upstream
git branch -u origin/main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

License

GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.