mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
xdg-popup: don't emit parent's new_popup signal too early
This commit is contained in:
parent
629a5171f2
commit
e7deea44fd
@ -422,7 +422,6 @@ void create_xdg_popup(struct wlr_xdg_surface *surface,
|
|||||||
if (parent) {
|
if (parent) {
|
||||||
surface->popup->parent = parent->surface;
|
surface->popup->parent = parent->surface;
|
||||||
wl_list_insert(&parent->popups, &surface->popup->link);
|
wl_list_insert(&parent->popups, &surface->popup->link);
|
||||||
wl_signal_emit_mutable(&parent->events.new_popup, surface->popup);
|
|
||||||
} else {
|
} else {
|
||||||
wl_list_init(&surface->popup->link);
|
wl_list_init(&surface->popup->link);
|
||||||
}
|
}
|
||||||
@ -430,6 +429,9 @@ void create_xdg_popup(struct wlr_xdg_surface *surface,
|
|||||||
set_xdg_surface_role_object(surface, surface->popup->resource);
|
set_xdg_surface_role_object(surface, surface->popup->resource);
|
||||||
|
|
||||||
wl_signal_emit_mutable(&surface->client->shell->events.new_popup, surface->popup);
|
wl_signal_emit_mutable(&surface->client->shell->events.new_popup, surface->popup);
|
||||||
|
if (parent) {
|
||||||
|
wl_signal_emit_mutable(&parent->events.new_popup, surface->popup);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user