aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-12-02 21:49:09 -0500
committeremersion <contact@emersion.fr>2018-12-03 08:51:27 +0100
commit9b41db32ec1eda4f67267346a8535c9c30e1cabb (patch)
tree2df5db2a0bbf4b3d79169b96c628bf22b3ff2836 /swaybar/bar.c
parent2942bbbc609a5ed2137dd9319bcdfae636df30a1 (diff)
Fix identifier output configs on reload
When generating default output configs to reset the outputs to their default settings on reload, the output name was being used. Additionally when determining the output config to apply, if there was an output config with the output name, that was being used without checking for an identifier config. This caused sway to completely ignore the users specified output config. To fix this issue, the following changes have been made: 1. Default output configs as created for the identifier now instead of name. This actually makes more sense anyway since you could hotplug multiple different outputs to the same port. 2. In get_output_config, which is only used to determine which output config to apply, output configs for both the name and identifier are queried. If both are found, a new output config is generated with the identifier config merged on top of the name config. If just one is found, a copy of that config is returned. This change also requires that the result from get_output_config be freed after use to prevent memory leaks, which required some minor changes to logic in apply_output_config_to_outputs.
Diffstat (limited to 'swaybar/bar.c')
0 files changed, 0 insertions, 0 deletions