|
|
@ -530,42 +530,9 @@ static void layer_surface_iterator(struct wlr_surface *surface,
|
|
|
|
iter_data->user_data);
|
|
|
|
iter_data->user_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void xdg_surface_for_each_surface(struct wlr_xdg_surface *surface,
|
|
|
|
|
|
|
|
int x, int y, wlr_surface_iterator_func_t iterator, void *user_data) {
|
|
|
|
|
|
|
|
struct layer_surface_iterator_data data = {
|
|
|
|
|
|
|
|
.user_iterator = iterator,
|
|
|
|
|
|
|
|
.user_data = user_data,
|
|
|
|
|
|
|
|
.x = x, .y = y,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
wlr_surface_for_each_surface(
|
|
|
|
|
|
|
|
surface->surface, layer_surface_iterator, &data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct wlr_xdg_popup *popup_state;
|
|
|
|
|
|
|
|
wl_list_for_each(popup_state, &surface->popups, link) {
|
|
|
|
|
|
|
|
struct wlr_xdg_surface *popup = popup_state->base;
|
|
|
|
|
|
|
|
if (!popup->configured) {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double popup_sx = popup_state->geometry.x - popup_state->base->geometry.x;
|
|
|
|
|
|
|
|
double popup_sy = popup_state->geometry.y - popup_state->base->geometry.y;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xdg_surface_for_each_surface(popup,
|
|
|
|
|
|
|
|
x + popup_sx,
|
|
|
|
|
|
|
|
y + popup_sy,
|
|
|
|
|
|
|
|
iterator, user_data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wlr_layer_surface_v1_for_each_surface(struct wlr_layer_surface_v1 *surface,
|
|
|
|
void wlr_layer_surface_v1_for_each_surface(struct wlr_layer_surface_v1 *surface,
|
|
|
|
wlr_surface_iterator_func_t iterator, void *user_data) {
|
|
|
|
wlr_surface_iterator_func_t iterator, void *user_data) {
|
|
|
|
struct layer_surface_iterator_data data = {
|
|
|
|
wlr_surface_for_each_surface(surface->surface, iterator, user_data);
|
|
|
|
.user_iterator = iterator,
|
|
|
|
|
|
|
|
.user_data = user_data,
|
|
|
|
|
|
|
|
.x = 0, .y = 0,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
wlr_surface_for_each_surface(surface->surface,
|
|
|
|
|
|
|
|
layer_surface_iterator, &data);
|
|
|
|
|
|
|
|
wlr_layer_surface_v1_for_each_popup(surface, iterator, user_data);
|
|
|
|
wlr_layer_surface_v1_for_each_popup(surface, iterator, user_data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -582,8 +549,13 @@ void wlr_layer_surface_v1_for_each_popup(struct wlr_layer_surface_v1 *surface,
|
|
|
|
popup_sx = popup->popup->geometry.x - popup->geometry.x;
|
|
|
|
popup_sx = popup->popup->geometry.x - popup->geometry.x;
|
|
|
|
popup_sy = popup->popup->geometry.y - popup->geometry.y;
|
|
|
|
popup_sy = popup->popup->geometry.y - popup->geometry.y;
|
|
|
|
|
|
|
|
|
|
|
|
xdg_surface_for_each_surface(popup,
|
|
|
|
struct layer_surface_iterator_data data = {
|
|
|
|
popup_sx, popup_sy, iterator, user_data);
|
|
|
|
.user_iterator = iterator,
|
|
|
|
|
|
|
|
.user_data = user_data,
|
|
|
|
|
|
|
|
.x = popup_sx, .y = popup_sy,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wlr_xdg_surface_for_each_surface(popup, layer_surface_iterator, &data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|