aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-06-05 23:01:43 -0400
committerTony Crisci <tony@dubstepdish.com>2018-06-05 23:01:43 -0400
commit9333acd68e468d409cbcc30fb742fdf57c631cb9 (patch)
tree71eb8d51a680bf1f06a3b323b523153eceb89bd3
parent319ebdf47628b2761fcb7cf86bf4024b882becec (diff)
downloadwlroots-9333acd68e468d409cbcc30fb742fdf57c631cb9.tar.xz
handle drag icon map in rootston
-rw-r--r--include/rootston/seat.h1
-rw-r--r--rootston/seat.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/include/rootston/seat.h b/include/rootston/seat.h
index bed81c88..0e3043dd 100644
--- a/include/rootston/seat.h
+++ b/include/rootston/seat.h
@@ -58,6 +58,7 @@ struct roots_drag_icon {
double x, y;
struct wl_listener surface_commit;
+ struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
};
diff --git a/rootston/seat.c b/rootston/seat.c
index 81cedc5a..132b0f35 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -263,6 +263,13 @@ static void roots_drag_icon_handle_surface_commit(struct wl_listener *listener,
roots_drag_icon_damage_whole(icon);
}
+static void roots_drag_icon_handle_map(struct wl_listener *listener,
+ void *data) {
+ struct roots_drag_icon *icon =
+ wl_container_of(listener, icon, map);
+ roots_drag_icon_damage_whole(icon);
+}
+
static void roots_drag_icon_handle_unmap(struct wl_listener *listener,
void *data) {
struct roots_drag_icon *icon =
@@ -299,6 +306,8 @@ static void roots_seat_handle_new_drag_icon(struct wl_listener *listener,
wl_signal_add(&wlr_drag_icon->surface->events.commit, &icon->surface_commit);
icon->unmap.notify = roots_drag_icon_handle_unmap;
wl_signal_add(&wlr_drag_icon->events.unmap, &icon->unmap);
+ icon->map.notify = roots_drag_icon_handle_map;
+ wl_signal_add(&wlr_drag_icon->events.map, &icon->map);
icon->destroy.notify = roots_drag_icon_handle_destroy;
wl_signal_add(&wlr_drag_icon->events.destroy, &icon->destroy);