mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
Fix crash in workspace_wrap_children
When workspace_wrap_children is called on a workspace which has a fullscreen child and the fullscreen child is a direct child of the workspace, sway would crash. The workspace's fullscreen pointer is unset when the fullscreen container is detached and applied again when added to a parent, but in this case the parent hadn't yet been added to the workspace which meant con->workspace was NULL. The fix makes container_handle_fullscreen_reparent return if there's no workspace, and the fullscreen pointer is reapplied in workspace_wrap_children.
This commit is contained in:
parent
403905c11b
commit
df95c61044
2 changed files with 4 additions and 1 deletions
|
|
@ -1063,7 +1063,8 @@ list_t *container_get_current_siblings(struct sway_container *container) {
|
|||
}
|
||||
|
||||
void container_handle_fullscreen_reparent(struct sway_container *con) {
|
||||
if (!con->is_fullscreen || con->workspace->fullscreen == con) {
|
||||
if (!con->is_fullscreen || !con->workspace ||
|
||||
con->workspace->fullscreen == con) {
|
||||
return;
|
||||
}
|
||||
if (con->workspace->fullscreen) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue