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

@ -42,10 +42,10 @@ refocus_output(struct session_lock_output *output)
struct session_lock_output *iter;
wl_list_for_each(iter, &output->lock->session_lock_outputs, link) {
if (iter == output || !iter->surface) {
if (iter == output || !iter->surface || !iter->surface->surface) {
continue;
}
if (iter->surface->mapped) {
if (iter->surface->surface->mapped) {
focus_surface(output->lock, iter->surface->surface);
return;
}
@ -110,7 +110,7 @@ found_lock_output:
wl_signal_add(&lock_surface->events.destroy, &lock_output->surface_destroy);
lock_output->surface_map.notify = handle_surface_map;
wl_signal_add(&lock_surface->events.map, &lock_output->surface_map);
wl_signal_add(&lock_surface->surface->events.map, &lock_output->surface_map);
lock_output_reconfigure(lock_output);
}