Chase wlroots: Unified mapping

Need to handle new unified mapping, where mapping is attached to the
wlr_surface objects instead of their parents. Also, most of them require
a new associate event for xsurface objects, their surface member will be
NULL before this event is received.

Refactored by jlindgren:
- add struct mappable
- unify map/unmap logic
This commit is contained in:
Christopher Snowhill 2023-06-15 02:35:43 -07:00 committed by Johan Malm
parent bf576e97de
commit d7dc6e01b4
10 changed files with 142 additions and 52 deletions

View file

@ -89,9 +89,9 @@ drag_icon_create(struct seat *seat, struct wlr_drag_icon *wlr_icon)
self->events.unmap.notify = handle_icon_unmap;
self->events.destroy.notify = handle_icon_destroy;
wl_signal_add(&wlr_icon->events.map, &self->events.map);
wl_signal_add(&wlr_icon->surface->events.map, &self->events.map);
wl_signal_add(&wlr_icon->surface->events.commit, &self->events.commit);
wl_signal_add(&wlr_icon->events.unmap, &self->events.unmap);
wl_signal_add(&wlr_icon->surface->events.unmap, &self->events.unmap);
wl_signal_add(&wlr_icon->events.destroy, &self->events.destroy);
}