aboutsummaryrefslogtreecommitdiff
path: root/sway/tree
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-01-18 08:23:25 -0500
committerGitHub <noreply@github.com>2019-01-18 08:23:25 -0500
commit978d6cd854c6340690387d07e159675b6406565d (patch)
tree7c40fbaebce93738d1f44d32f2d6f059a073e85e /sway/tree
parentdc1eac0cf12593fa20122142f087bbb3bc8e7589 (diff)
parenta737d7ecc4d7f4825ca7879e3449522bc87049be (diff)
downloadsway-978d6cd854c6340690387d07e159675b6406565d.tar.xz
Merge pull request #3455 from emersion/output-no-crtc
Better handle outputs without CRTC
Diffstat (limited to 'sway/tree')
-rw-r--r--sway/tree/output.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c
index 3c376c6b..21beb504 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -78,6 +78,12 @@ void output_enable(struct sway_output *output, struct output_config *oc) {
}
output->enabled = true;
+ if (!apply_output_config(oc, output)) {
+ output->enabled = false;
+ return;
+ }
+
+ output->configured = true;
list_add(root->outputs, output);
output->lx = wlr_output->lx;
@@ -104,8 +110,6 @@ void output_enable(struct sway_output *output, struct output_config *oc) {
ipc_event_workspace(NULL, ws, "init");
}
- apply_output_config(oc, output);
-
if (ws && config->default_orientation == L_NONE) {
// Since the output transformation and resolution could have changed
// due to applying the output config, the previously set layout for the