desktop: Avoid sending the dimensions for the first output
[src/agl-compositor.git] / src / desktop.c
index 1351508..1cda129 100644 (file)
@@ -128,7 +128,8 @@ desktop_surface_added_configure(struct ivi_surface *surface,
 
        ivi_check_pending_surface_desktop(surface, &role);
        if ((role != IVI_SURFACE_ROLE_DESKTOP &&
-            role != IVI_SURFACE_ROLE_FULLSCREEN) ||
+            role != IVI_SURFACE_ROLE_FULLSCREEN &&
+            role != IVI_SURFACE_ROLE_REMOTE) ||
             role == IVI_SURFACE_ROLE_NONE)
                return;
 
@@ -222,7 +223,10 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata)
 
        if (output && ivi->shell_client.ready) {
                struct ivi_output *ivi_output = to_ivi_output(output);
-               desktop_surface_added_configure(surface, ivi_output);
+               if (active_output)
+                       desktop_surface_added_configure(surface, active_output);
+               else
+                       desktop_surface_added_configure(surface, ivi_output);
        }
        /*
         * We delay creating "normal" desktop surfaces until later, to
@@ -323,10 +327,8 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
        /* check if there's a last 'remote' surface and insert a black
         * surface view if there's no background set for that output
         */
-       if ((desktop_surface_check_last_remote_surfaces(output->ivi,
-               IVI_SURFACE_ROLE_REMOTE) ||
-           desktop_surface_check_last_remote_surfaces(output->ivi,
-               IVI_SURFACE_ROLE_DESKTOP)) && output->type == OUTPUT_REMOTE)
+       if (desktop_surface_check_last_remote_surfaces(output->ivi, IVI_SURFACE_ROLE_REMOTE) ||
+            desktop_surface_check_last_remote_surfaces(output->ivi, IVI_SURFACE_ROLE_DESKTOP))
                if (!output->background)
                        insert_black_surface(output);