struct weston_surface *es = shsurf->surface;
struct weston_surface *parent = shsurf->parent;
+ /* Remove the old transform. We don't want to add it twice
+ * otherwise Weston will go into an infinite loop when going
+ * through the transforms. */
+ if (!wl_list_empty(&shsurf->popup.parent_transform.link)) {
+ wl_list_remove(&shsurf->popup.parent_transform.link);
+ wl_list_init(&shsurf->popup.parent_transform.link);
+ }
+
es->output = parent->output;
shsurf->popup.grab.interface = &popup_grab_interface;
weston_matrix_init(&shsurf->rotation.rotation);
wl_list_init(&shsurf->workspace_transform.link);
+ wl_list_init(&shsurf->popup.parent_transform.link);
shsurf->type = SHELL_SURFACE_NONE;
shsurf->next_type = SHELL_SURFACE_NONE;