diff options
author | D.B <thejan.2009@gmail.com> | 2016-08-10 18:52:49 +0200 |
---|---|---|
committer | D.B <thejan.2009@gmail.com> | 2016-08-10 18:52:49 +0200 |
commit | ce98569fbc604b76a1dd066bb6ba6da35fde6dda (patch) | |
tree | 6fb0de479008bf961d16c2dacaee07d9adf3ab10 /sway/config.c | |
parent | Merge pull request #846 from mmlb/doc-all-xkb-env-vars (diff) | |
download | sway-ce98569fbc604b76a1dd066bb6ba6da35fde6dda.tar.gz sway-ce98569fbc604b76a1dd066bb6ba6da35fde6dda.tar.zst sway-ce98569fbc604b76a1dd066bb6ba6da35fde6dda.zip |
Handle output disabling during runtime
Output now gets disabled if disable command is invoked via bindsym or
IPC.
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index a1f33dcf..8531a337 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -859,6 +859,11 @@ void apply_input_config(struct input_config *ic, struct libinput_device *dev) { | |||
859 | } | 859 | } |
860 | 860 | ||
861 | void apply_output_config(struct output_config *oc, swayc_t *output) { | 861 | void apply_output_config(struct output_config *oc, swayc_t *output) { |
862 | if (oc->enabled == 0) { | ||
863 | destroy_output(output); | ||
864 | return; | ||
865 | } | ||
866 | |||
862 | if (oc && oc->width > 0 && oc->height > 0) { | 867 | if (oc && oc->width > 0 && oc->height > 0) { |
863 | output->width = oc->width; | 868 | output->width = oc->width; |
864 | output->height = oc->height; | 869 | output->height = oc->height; |