mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
Fix crash when disconnecting output
If the output being disconnected contains views, and the views are being relocated to another output of a different size, a transaction must occur to reconfigure them. This means by the time container_discover_outputs is called, the output is already disabled and wlr_output is NULL. I considered making it check output->wlr_output, but output->enabled should work just as well and is more descriptive.
This commit is contained in:
parent
a032925ae7
commit
b1a0e95e8e
1 changed files with 2 additions and 1 deletions
|
@ -985,7 +985,8 @@ void container_discover_outputs(struct sway_container *con) {
|
|||
}
|
||||
}
|
||||
struct sway_output *new_output = container_get_effective_output(con);
|
||||
double old_scale = old_output ? old_output->wlr_output->scale : -1;
|
||||
double old_scale = old_output && old_output->enabled ?
|
||||
old_output->wlr_output->scale : -1;
|
||||
double new_scale = new_output ? new_output->wlr_output->scale : -1;
|
||||
if (old_scale != new_scale) {
|
||||
container_update_title_textures(con);
|
||||
|
|
Loading…
Reference in a new issue