mirror of
https://github.com/swaywm/sway.git
synced 2026-04-03 07:15:39 -04:00
Fix xwayland configure request scratchpad crash
This fixes a crash in `container_init_floating` when a xwayland view sends a configure request while in the scratchpad. `container_init_floating` gets called so the configured minimum and maximum sizes gets respected when resizing to the requested size. Since the workspace was NULL, it would SIGSEGV when attempting to get the workspace's output for the output box retrieval. This extracts the resizing portion of `container_init_floating` into a separate function. If the container is in the scratchpad, it will just be resized and skip the centering. Additionally, `container_init_floating` has been renamed to `container_floating_resize_and_center` to more accurately describe what it does.
This commit is contained in:
parent
31eeda11b0
commit
dd28e6a6d6
5 changed files with 31 additions and 29 deletions
|
|
@ -77,7 +77,7 @@ static void restore_workspaces(struct sway_output *output) {
|
|||
floater->y > output->ly + output->height ||
|
||||
floater->x + floater->width < output->lx ||
|
||||
floater->y + floater->height < output->ly) {
|
||||
container_init_floating(floater);
|
||||
container_floating_resize_and_center(floater);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue