diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-21 22:07:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-21 22:07:44 -0400 |
commit | e8f92838943920addcb0f80894f4e152eafa5ae4 (patch) | |
tree | c9cd07e837b454ff227fde4d7511a98c805bca27 /rootston | |
parent | d4e311a1adeee7cfd2a4404d716f3e0237ead607 (diff) | |
parent | 16f35ecbeacd685e7d9905a7867d8c950e369f2e (diff) |
Merge pull request #298 from raazvvann/heghe/wl_list
Replace list_t with wl_list
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/output.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rootston/output.c b/rootston/output.c index 5b7297ae..99f70bcf 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -166,9 +166,11 @@ void output_add_notify(struct wl_listener *listener, void *data) { wlr_log(L_DEBUG, "%s %s %"PRId32"mm x %"PRId32"mm", wlr_output->make, wlr_output->model, wlr_output->phys_width, wlr_output->phys_height); - if (wlr_output->modes->length > 0) { - wlr_output_set_mode(wlr_output, wlr_output->modes->items[0]); - } + if (wl_list_length(&wlr_output->modes) > 0) { + struct wlr_output_mode *mode = NULL; + mode = wl_container_of((&wlr_output->modes)->prev, mode, link); + wlr_output_set_mode(wlr_output, mode); + } struct roots_output *output = calloc(1, sizeof(struct roots_output)); clock_gettime(CLOCK_MONOTONIC, &output->last_frame); |