shell: Fix not destroy black surface when fullscreen surface exit abnomally.
authorAlex Wu <zhiwen.wu@linux.intel.com>
Mon, 5 Mar 2012 03:01:40 +0000 (11:01 +0800)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 8 Mar 2012 17:57:54 +0000 (12:57 -0500)
When a client with fullscreen surface displayed was aborted by Ctrl-C, the
black surface still be there. Destroy the black surface in
destroy_shell_surface().

src/shell.c

index 5d2c239..31989b9 100644 (file)
@@ -774,6 +774,9 @@ destroy_shell_surface(struct wl_resource *resource)
        if (shsurf->surface)
                wl_list_remove(&shsurf->surface_destroy_listener.link);
 
+       if (shsurf->fullscreen.black_surface)
+               weston_surface_destroy(shsurf->fullscreen.black_surface);
+
        wl_list_remove(&shsurf->link);
        free(shsurf);
 }