mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 02:17:59 +02:00
shell: Do not hang after setting input_panel twice
Ignore multiple calls with the same surface in input_panel_set_surface. Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
This commit is contained in:
parent
af7b6c9c6d
commit
23ccfb3ef9
1 changed files with 8 additions and 0 deletions
|
|
@ -3309,6 +3309,14 @@ input_panel_set_surface(struct wl_client *client,
|
|||
surface->private = shell;
|
||||
surface->output = output;
|
||||
|
||||
/* Do not do anything when surface is already in the list of
|
||||
* input panel surfaces
|
||||
*/
|
||||
wl_list_for_each(input_panel_surface, &shell->input_panel.surfaces, link) {
|
||||
if (input_panel_surface->surface == surface)
|
||||
return;
|
||||
}
|
||||
|
||||
input_panel_surface = malloc(sizeof *input_panel_surface);
|
||||
if (!input_panel_surface) {
|
||||
wl_resource_post_no_memory(resource);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue