Commit 40b9105e authored by Wenzhao Zang's avatar Wenzhao Zang Committed by Commit Bot

cros: Allow frame-less windows to show shadow

The current code assumes that a frame-less window does not need shadow.
However, it's important for the CrOS wallpaper picker to remain
frame-less to support wallpaper preview in tablet mode (spec [1]), and
have a shadow in clamshell mode. It should makes sense to delete this
logic since wallpaper picker is the only component extension that needs
this behavior, and no current public apps are able to use the API.

[1] https://drive.google.com/corp/drive/folders/0B_2Uyb2Rhx2ObU5VTFJVWHR2WW8

Bug: 835205
Change-Id: I96c9b14806f8f03ea2278d11031a33b08e7a68e8
Reviewed-on: https://chromium-review.googlesource.com/1135577
Commit-Queue: Wenzhao (Colin) Zang <wzang@chromium.org>
Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582036}
parent e19d11aa
...@@ -111,16 +111,9 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow( ...@@ -111,16 +111,9 @@ void ChromeNativeAppWindowViews::InitializeDefaultWindow(
init_params.delegate = this; init_params.delegate = this;
init_params.remove_standard_frame = ShouldRemoveStandardFrame(); init_params.remove_standard_frame = ShouldRemoveStandardFrame();
init_params.use_system_default_icon = true; init_params.use_system_default_icon = true;
if (create_params.alpha_enabled) { if (create_params.alpha_enabled)
init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; init_params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
// The given window is most likely not rectangular since it uses
// transparency and has no standard frame, don't show a shadow for it.
// TODO(skuhne): If we run into an application which should have a shadow
// but does not have, a new attribute has to be added.
if (IsFrameless())
init_params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE;
}
init_params.keep_on_top = create_params.always_on_top; init_params.keep_on_top = create_params.always_on_top;
init_params.visible_on_all_workspaces = init_params.visible_on_all_workspaces =
create_params.visible_on_all_workspaces; create_params.visible_on_all_workspaces;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment