After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784223 - screen: Remove stray assert
screen: Remove stray assert
Product: mutter
Classification: Core
Component: general
Other All
: Normal normal
: ---
Assigned To: mutter-maint
: 781924 (view as bug list)
Depends on:
Reported: 2017-06-26 16:50 UTC by Florian Müllner
Modified: 2017-07-07 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---

screen: Remove stray assert (1.20 KB, patch)
2017-06-26 16:50 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-06-26 16:50:29 UTC
See patch.
Comment 1 Florian Müllner 2017-06-26 16:50:33 UTC
Created attachment 354523 [details] [review]
screen: Remove stray assert

When the number of (static) workspaces decreases, we relocate windows
from extra workspaces before removing them. As removing a non-empty
workspace is not allowed, we assert that it doesn't contain any windows
before removing it.

However that assert is

 - pointless, because meta_workspace_remove() already asserts that
   the workspace is empty

 - wrong, because even empty workspaces contain windows that are set
   to show on all workspaces

Simply drop the assert to avoid a crash when trying to remove a workspace
while on-all-workspaces windows are present.
Comment 2 Rui Matos 2017-07-05 13:32:20 UTC
Review of attachment 354523 [details] [review]:

looks pretty obvious - wonder why we weren't hitting this until now
Comment 3 Florian Müllner 2017-07-05 14:41:18 UTC
Attachment 354523 [details] pushed as 80e5955 - screen: Remove stray assert

(In reply to Rui Matos from comment #2)
> wonder why we weren't hitting this until now

Well, it's not *that* likely - first dynamic workspaces need to be disabled, then a sticky window needs to be around when the setting is changed. Classic mode is probably the most important reproducer (static workspaces + desktop icons), but it looks like it's not used that much, or its users are generally happy with the default number of workspaces ...
Comment 4 Rui Matos 2017-07-07 13:00:13 UTC
*** Bug 781924 has been marked as a duplicate of this bug. ***