When running gtk3-demo under weston opening comboboxes a second time
causes the program to bail due to weston returning an error. The
relevant client trace in this case is:
-> [email protected]_xdg_popup(new id xdg_popup@12, wl_surface@28, ....
-> [email protected]()
-> [email protected]_xdg_popup(new id xdg_popup@19, wl_surface@28, ....
[email protected](wl_surface@28, 0,
"xdg_shell::get_xdg_popup already requested")
However, according to the xdg_shell protocol this should be valid as
calling destroy should remove the xdg_popup interface from the
wl_surface object.
Fix this by ensuring the internal shell surface also gets destroyed when
the relevant xdg interface is destroyed and not just when the underlying
wl_surface gets destroyed.
This patch applies both to Weston 1.5 and master, please apply to both
if correct.
---
desktop-shell/shell.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 46c6e18..45a3321 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3153,6 +3153,7 @@ destroy_shell_surface(struct shell_surface *shsurf)
/* As destroy_resource() use wl_list_for_each_safe(),
* we can always remove the listener.
*/
+ wl_list_remove(&shsurf->resource_destroy_listener.link);
wl_list_remove(&shsurf->surface_destroy_listener.link);
shsurf->surface->configure = NULL;
free(shsurf->title);
@@ -3175,6 +3176,7 @@ shell_destroy_shell_surface(struct wl_resource *resource)
if (!wl_list_empty(&shsurf->popup.grab_link))
remove_popup_grab(shsurf);
shsurf->resource = NULL;
+ destroy_shell_surface(shsurf);
}
static void
--
2.0.0
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel