shell: don't assign output for surface of type none
authorAnder Conselvan de Oliveira <conselvan2@gmail.com>
Mon, 5 Mar 2012 13:39:23 +0000 (15:39 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 8 Mar 2012 18:10:18 +0000 (13:10 -0500)
If map is called with a surface of type none it will call
weston_surface_assign_output, even though the surface will
not be mapped.

This change was lost with the changes for using wl_layers.

src/shell.c

index f942cf9..92b7540 100644 (file)
@@ -1582,10 +1582,12 @@ map(struct weston_shell *base, struct weston_surface *surface,
                break;
        }
 
-       weston_surface_assign_output(surface);
-       weston_compositor_repick(compositor);
-       if (surface_type == SHELL_SURFACE_MAXIMIZED)
-               surface->output = shsurf->output;
+       if (surface_type != SHELL_SURFACE_NONE) {
+               weston_surface_assign_output(surface);
+               weston_compositor_repick(compositor);
+               if (surface_type == SHELL_SURFACE_MAXIMIZED)
+                       surface->output = shsurf->output;
+       }
 
        switch (surface_type) {
        case SHELL_SURFACE_TOPLEVEL: