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 /examples | |
parent | d4e311a1adeee7cfd2a4404d716f3e0237ead607 (diff) | |
parent | 16f35ecbeacd685e7d9905a7867d8c950e369f2e (diff) |
Merge pull request #298 from raazvvann/heghe/wl_list
Replace list_t with wl_list
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pointer.c | 3 | ||||
-rw-r--r-- | examples/shared.c | 6 | ||||
-rw-r--r-- | examples/touch.c | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/examples/pointer.c b/examples/pointer.c index 92faaf0c..8c3c8b85 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -21,6 +21,7 @@ #include <wlr/xcursor.h> #include <wlr/types/wlr_cursor.h> #include <wlr/util/log.h> +#include <wlr/types/wlr_list.h> #include "shared.h" #include "config.h" #include "cat.h" @@ -45,7 +46,7 @@ struct sample_state { struct wl_listener touch_up; struct wl_listener touch_down; struct wl_listener touch_cancel; - list_t *touch_points; + struct wlr_list *touch_points; struct wl_listener tablet_tool_axis; struct wl_listener tablet_tool_proxmity; diff --git a/examples/shared.c b/examples/shared.c index 1fdd5775..4cde15d1 100644 --- a/examples/shared.c +++ b/examples/shared.c @@ -413,8 +413,10 @@ static void output_add_notify(struct wl_listener *listener, void *data) { wlr_log(L_DEBUG, "Output '%s' added", output->name); wlr_log(L_DEBUG, "%s %s %"PRId32"mm x %"PRId32"mm", output->make, output->model, output->phys_width, output->phys_height); - if (output->modes->length > 0) { - wlr_output_set_mode(output, output->modes->items[0]); + if (wl_list_length(&output->modes) > 0) { + struct wlr_output_mode *mode = NULL; + wl_container_of((&output->modes)->prev, mode, link); + wlr_output_set_mode(output, mode); } struct output_state *ostate = calloc(1, sizeof(struct output_state)); clock_gettime(CLOCK_MONOTONIC, &ostate->last_frame); diff --git a/examples/touch.c b/examples/touch.c index db025942..60fb0ae4 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -16,7 +16,7 @@ #include <wlr/render.h> #include <wlr/backend.h> #include <wlr/backend/session.h> -#include <wlr/util/list.h> +#include <wlr/types/wlr_list.h> #include <wlr/util/log.h> #include "shared.h" #include "cat.h" @@ -24,7 +24,7 @@ struct sample_state { struct wlr_renderer *renderer; struct wlr_texture *cat_texture; - list_t *touch_points; + struct wlr_list *touch_points; }; struct touch_point { |