commit ce98569fbc604b76a1dd066bb6ba6da35fde6dda
parent 49afdb43933f548ab9b2233d59998d581ef6efa1
Author: D.B <thejan.2009@gmail.com>
Date: Wed, 10 Aug 2016 18:52:49 +0200
Handle output disabling during runtime
Output now gets disabled if disable command is invoked via bindsym or
IPC.
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/sway/config.c b/sway/config.c
@@ -859,6 +859,11 @@ void apply_input_config(struct input_config *ic, struct libinput_device *dev) {
}
void apply_output_config(struct output_config *oc, swayc_t *output) {
+ if (oc->enabled == 0) {
+ destroy_output(output);
+ return;
+ }
+
if (oc && oc->width > 0 && oc->height > 0) {
output->width = oc->width;
output->height = oc->height;