Index: ash/desktop_background/desktop_background_controller.cc |
=================================================================== |
--- ash/desktop_background/desktop_background_controller.cc (revision 133513) |
+++ ash/desktop_background/desktop_background_controller.cc (working copy) |
@@ -29,11 +29,14 @@ |
void DesktopBackgroundController::SetDesktopBackgroundImageMode() { |
internal::RootWindowLayoutManager* root_window_layout = |
Shell::GetInstance()->root_window_layout(); |
+ if (root_window_layout->background_widget()) |
+ root_window_layout->background_widget()->Hide(); |
int index = Shell::GetInstance()->user_wallpaper_delegate()-> |
GetUserWallpaperIndex(); |
root_window_layout->SetBackgroundLayer(NULL); |
- internal::CreateDesktopBackground(GetWallpaper(index), |
- GetWallpaperInfo(index).layout); |
+ root_window_layout->SetBackgroundWidget( |
+ internal::CreateDesktopBackground(GetWallpaper(index), |
+ GetWallpaperInfo(index).layout)); |
desktop_background_mode_ = BACKGROUND_IMAGE; |
} |