New issue
Advanced search Search tips

Issue 597732 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Windows: views: HWNDMessageHandler::SetWindowIcons always uses 1x scale bitmaps

Project Member Reported by marshall@chromium.org, Mar 24 2016

Issue description

Version: Chromium revision 0bfd25d4 (#381305)
OS: Windows 10 64-bit, HiDPI display

What steps will reproduce the problem?
(1) Call Widget::UpdateWindowIcon().
(2) Return an ImageSkia from WidgetDelegate::GetWindowIcon() containing bitmaps at 1x and 2x scale factors.

What is the expected output?

The 2x scale bitmap representation should be used.

What do you see instead?

The 1x scale bitmap representation is used.

Please use labels and text to provide additional information.

Widget::UpdateWindowIcon() eventually results in a call to HWNDMessageHandler::SetWindowIcons() [1] which uses the ImageSkia::bitmap() method [2]. This method always returns the 1x scale bitmap [3]. SetWindowIcons() should instead use the bitmap nearest the display scale factor.

[1] Call stack to SetWindowIcons:

>	views::HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia & window_icon, const gfx::ImageSkia & app_icon) Line 818	C++
 	views::DesktopWindowTreeHostWin::SetWindowIcons(const gfx::ImageSkia & window_icon, const gfx::ImageSkia & app_icon) Line 450	C++
 	views::DesktopNativeWidgetAura::SetWindowIcons(const gfx::ImageSkia & window_icon, const gfx::ImageSkia & app_icon) Line 653	C++
 	views::Widget::UpdateWindowIcon() Line 850	C++

[2] https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/win/hwnd_message_handler.cc&q=HWNDMessageHandler::SetWindowIcons&sq=package:chromium&type=cs&l=799

[3] https://code.google.com/p/chromium/codesearch#chromium/src/ui/gfx/image/image_skia.h&q=ImageSkia::bitmap&sq=package:chromium&type=cs&l=141
 

Comment 1 by sky@chromium.org, Mar 24 2016

Cc: robliao@chromium.org bsep@chromium.org scottmg@chromium.org
Status: Archived (was: Untriaged)
Archiving old bugs that haven't been modified in over two years. 

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Sign in to add a comment