X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fdesktop.c;h=3dc1cebb1b9edf29fd5b526388eccbfe1c60c928;hb=b3c4f205c94e55d574483160f5d38b0bfc7c1d16;hp=a3552e2141f3e6b34598e4de268570047ab464d7;hpb=f235042e4cd88197ade414795382ba227f924332;p=src%2Fagl-compositor.git diff --git a/src/desktop.c b/src/desktop.c index a3552e2..3dc1ceb 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -112,13 +112,13 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata) } static bool -desktop_surface_check_last_remote_surfaces(struct ivi_compositor *ivi) +desktop_surface_check_last_remote_surfaces(struct ivi_compositor *ivi, enum ivi_surface_role role) { int count = 0; struct ivi_surface *surf; wl_list_for_each(surf, &ivi->surfaces, link) - if (surf->role == IVI_SURFACE_ROLE_REMOTE) + if (surf->role == role) count++; return (count == 1); @@ -157,7 +157,13 @@ 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)) + if (desktop_surface_check_last_remote_surfaces(output->ivi, + IVI_SURFACE_ROLE_REMOTE)) + if (!output->background) + insert_black_surface(output); + + if (desktop_surface_check_last_remote_surfaces(output->ivi, + IVI_SURFACE_ROLE_DESKTOP)) if (!output->background) insert_black_surface(output); @@ -215,9 +221,6 @@ desktop_committed(struct weston_desktop_surface *dsurface, case IVI_SURFACE_ROLE_REMOTE: ivi_layout_desktop_committed(surface); break; - case IVI_SURFACE_ROLE_PANEL: - ivi_layout_panel_committed(surface); - break; case IVI_SURFACE_ROLE_POPUP: ivi_layout_popup_committed(surface); break; @@ -230,6 +233,7 @@ desktop_committed(struct weston_desktop_surface *dsurface, break; case IVI_SURFACE_ROLE_NONE: case IVI_SURFACE_ROLE_BACKGROUND: + case IVI_SURFACE_ROLE_PANEL: default: /* fall through */ break; }