diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-28 08:46:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 08:46:50 -0500 |
commit | 974d51058532b3076ec92b8c74e8d0630a9cdbd3 (patch) | |
tree | 205c46d6d75cffb2200712ac9bf30b1cce4a704b | |
parent | Merge pull request #1478 from acrisci/bug/remove-nvidia-support-claim (diff) | |
parent | set mode on output (diff) | |
download | sway-974d51058532b3076ec92b8c74e8d0630a9cdbd3.tar.gz sway-974d51058532b3076ec92b8c74e8d0630a9cdbd3.tar.zst sway-974d51058532b3076ec92b8c74e8d0630a9cdbd3.zip |
Merge pull request #1477 from acrisci/bug/set-mode
set mode on output
-rw-r--r-- | sway/desktop/output.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 99c74d89..169b044b 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -117,6 +117,12 @@ void output_add_notify(struct wl_listener *listener, void *data) { | |||
117 | output->server = server; | 117 | output->server = server; |
118 | output->swayc = new_output(output); | 118 | output->swayc = new_output(output); |
119 | 119 | ||
120 | if (wl_list_length(&wlr_output->modes) > 0) { | ||
121 | struct wlr_output_mode *mode = NULL; | ||
122 | mode = wl_container_of((&wlr_output->modes)->prev, mode, link); | ||
123 | wlr_output_set_mode(wlr_output, mode); | ||
124 | } | ||
125 | |||
120 | output->frame.notify = output_frame_notify; | 126 | output->frame.notify = output_frame_notify; |
121 | wl_signal_add(&wlr_output->events.frame, &output->frame); | 127 | wl_signal_add(&wlr_output->events.frame, &output->frame); |
122 | 128 | ||