diff options
| author | Drew DeVault <[email protected]> | 2019-01-18 08:23:25 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-18 08:23:25 -0500 |
| commit | 978d6cd854c6340690387d07e159675b6406565d (patch) | |
| tree | 7c40fbaebce93738d1f44d32f2d6f059a073e85e /sway/desktop | |
| parent | dc1eac0cf12593fa20122142f087bbb3bc8e7589 (diff) | |
| parent | a737d7ecc4d7f4825ca7879e3449522bc87049be (diff) | |
Merge pull request #3455 from emersion/output-no-crtc
Better handle outputs without CRTC
Diffstat (limited to 'sway/desktop')
| -rw-r--r-- | sway/desktop/output.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 3f6c3d87..37651d66 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -503,7 +503,18 @@ static void handle_destroy(struct wl_listener *listener, void *data) { static void handle_mode(struct wl_listener *listener, void *data) { struct sway_output *output = wl_container_of(listener, output, mode); + if (!output->configured) { + return; + } if (!output->enabled) { + struct output_config *oc = output_find_config(output); + if (output->wlr_output->current_mode != NULL && + (!oc || oc->enabled)) { + // We want to enable this output, but it didn't work last time, + // possibly because we hadn't enough CRTCs. Try again now that the + // output has a mode. + output_enable(output, oc); + } return; } arrange_layers(output); @@ -592,7 +603,6 @@ void handle_new_output(struct wl_listener *listener, void *data) { output->damage_destroy.notify = damage_handle_destroy; struct output_config *oc = output_find_config(output); - if (!oc || oc->enabled) { output_enable(output, oc); } else { |
