rename drag-icon map to unmap

This commit is contained in:
Tony Crisci 2018-06-05 18:17:42 -04:00
parent 7366e1ced9
commit 1c75d4e54a
4 changed files with 9 additions and 9 deletions

View file

@ -58,7 +58,7 @@ struct roots_drag_icon {
double x, y; double x, y;
struct wl_listener surface_commit; struct wl_listener surface_commit;
struct wl_listener map; struct wl_listener unmap;
struct wl_listener destroy; struct wl_listener destroy;
}; };

View file

@ -88,7 +88,7 @@ struct wlr_drag_icon {
int32_t sx, sy; int32_t sx, sy;
struct { struct {
struct wl_signal map; // emitted when mapped or unmapped struct wl_signal unmap;
struct wl_signal destroy; struct wl_signal destroy;
} events; } events;

View file

@ -263,10 +263,10 @@ static void roots_drag_icon_handle_surface_commit(struct wl_listener *listener,
roots_drag_icon_damage_whole(icon); roots_drag_icon_damage_whole(icon);
} }
static void roots_drag_icon_handle_map(struct wl_listener *listener, static void roots_drag_icon_handle_unmap(struct wl_listener *listener,
void *data) { void *data) {
struct roots_drag_icon *icon = struct roots_drag_icon *icon =
wl_container_of(listener, icon, map); wl_container_of(listener, icon, unmap);
roots_drag_icon_damage_whole(icon); roots_drag_icon_damage_whole(icon);
} }
@ -278,7 +278,7 @@ static void roots_drag_icon_handle_destroy(struct wl_listener *listener,
wl_list_remove(&icon->link); wl_list_remove(&icon->link);
wl_list_remove(&icon->surface_commit.link); wl_list_remove(&icon->surface_commit.link);
wl_list_remove(&icon->map.link); wl_list_remove(&icon->unmap.link);
wl_list_remove(&icon->destroy.link); wl_list_remove(&icon->destroy.link);
free(icon); free(icon);
} }
@ -297,8 +297,8 @@ static void roots_seat_handle_new_drag_icon(struct wl_listener *listener,
icon->surface_commit.notify = roots_drag_icon_handle_surface_commit; icon->surface_commit.notify = roots_drag_icon_handle_surface_commit;
wl_signal_add(&wlr_drag_icon->surface->events.commit, &icon->surface_commit); wl_signal_add(&wlr_drag_icon->surface->events.commit, &icon->surface_commit);
icon->map.notify = roots_drag_icon_handle_map; icon->unmap.notify = roots_drag_icon_handle_unmap;
wl_signal_add(&wlr_drag_icon->events.map, &icon->map); wl_signal_add(&wlr_drag_icon->events.unmap, &icon->unmap);
icon->destroy.notify = roots_drag_icon_handle_destroy; icon->destroy.notify = roots_drag_icon_handle_destroy;
wl_signal_add(&wlr_drag_icon->events.destroy, &icon->destroy); wl_signal_add(&wlr_drag_icon->events.destroy, &icon->destroy);

View file

@ -117,7 +117,7 @@ static void drag_end(struct wlr_drag *drag) {
if (drag->icon) { if (drag->icon) {
drag->icon->mapped = false; drag->icon->mapped = false;
wl_list_remove(&drag->icon_destroy.link); wl_list_remove(&drag->icon_destroy.link);
wlr_signal_emit_safe(&drag->icon->events.map, drag->icon); wlr_signal_emit_safe(&drag->icon->events.unmap, drag->icon);
} }
wlr_signal_emit_safe(&drag->events.destroy, drag); wlr_signal_emit_safe(&drag->events.destroy, drag);
@ -357,7 +357,7 @@ static struct wlr_drag_icon *drag_icon_create(
icon->touch_id = touch_id; icon->touch_id = touch_id;
icon->mapped = true; icon->mapped = true;
wl_signal_init(&icon->events.map); wl_signal_init(&icon->events.unmap);
wl_signal_init(&icon->events.destroy); wl_signal_init(&icon->events.destroy);
wl_signal_add(&icon->surface->events.destroy, &icon->surface_destroy); wl_signal_add(&icon->surface->events.destroy, &icon->surface_destroy);