mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-09 13:29:46 -05:00
layer-shell: forbid changing the existing popup parent
This commit is contained in:
parent
b355a12751
commit
dc7b5ab21e
1 changed files with 4 additions and 0 deletions
|
|
@ -220,6 +220,10 @@ static void layer_surface_handle_get_popup(struct wl_client *client,
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (popup->parent != NULL) {
|
||||||
|
wl_resource_post_error(layer_resource, -1, "xdg_popup already has a parent");
|
||||||
|
return;
|
||||||
|
}
|
||||||
popup->parent = parent->surface;
|
popup->parent = parent->surface;
|
||||||
wl_list_insert(&parent->popups, &popup->link);
|
wl_list_insert(&parent->popups, &popup->link);
|
||||||
wl_signal_emit_mutable(&parent->events.new_popup, popup);
|
wl_signal_emit_mutable(&parent->events.new_popup, popup);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue