diff options
author | emersion <contact@emersion.fr> | 2018-07-27 18:44:36 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-07-29 14:33:26 +0100 |
commit | dbf6dd0daec9e712a002c3e01accbd0fee769fac (patch) | |
tree | 21a9a3e7cae9818aa6b1876dc3fccf8d9a5f470c /sway/desktop | |
parent | d2172bd331937ab406175a6b4c5a76db6f406fbe (diff) |
wip: redesign output_drag_icons_for_each_surface iterator
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 15 | ||||
-rw-r--r-- | sway/desktop/render.c | 4 |
2 files changed, 10 insertions, 9 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 9c2a1a07..e83a9a3d 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -197,17 +197,18 @@ void output_unmanaged_for_each_surface(struct sway_output *output, } #endif -void output_drag_icons_for_each_surface(struct wl_list *drag_icons, - struct sway_output *output, struct root_geometry *geo, - wlr_surface_iterator_func_t iterator, void *user_data) { +void output_drag_icons_for_each_surface(struct sway_output *output, + struct wl_list *drag_icons, sway_surface_iterator_func_t iterator, + void *user_data) { struct sway_drag_icon *drag_icon; wl_list_for_each(drag_icon, drag_icons, link) { double ox = drag_icon->x - output->swayc->x; double oy = drag_icon->y - output->swayc->y; if (drag_icon->wlr_drag_icon->mapped) { - output_surface_for_each_surface(drag_icon->wlr_drag_icon->surface, - ox, oy, geo, iterator, user_data); + output_surface_for_each_surface2(output, + drag_icon->wlr_drag_icon->surface, ox, oy, 0, + iterator, user_data); } } } @@ -303,8 +304,8 @@ static void send_frame_done_unmanaged(struct send_frame_done_data *data, static void send_frame_done_drag_icons(struct send_frame_done_data *data, struct wl_list *drag_icons) { - output_drag_icons_for_each_surface(drag_icons, data->output, &data->root_geo, - send_frame_done_iterator, data); + output_drag_icons_for_each_surface(data->output, drag_icons, + send_frame_done_iterator2, data); } static void send_frame_done_container_iterator(struct sway_container *con, diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 8eea19e0..1270b7cf 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -179,8 +179,8 @@ static void render_drag_icons(struct sway_output *output, .damage = damage, .alpha = 1.0f, }; - output_drag_icons_for_each_surface(drag_icons, output, &data.root_geo, - render_surface_iterator, &data); + output_drag_icons_for_each_surface(output, drag_icons, + render_surface_iterator2, &data); } static void render_rect(struct wlr_output *wlr_output, |