| Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| index f792797e855ba9bce9df44581b395eb5a55fe9ea..98f99f4ca391096ad4998e798bce674d3774eeb1 100644
|
| --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
|
| @@ -850,11 +850,11 @@ bool DesktopWindowTreeHostX11::IsFullscreen() const {
|
| return is_fullscreen_;
|
| }
|
|
|
| -void DesktopWindowTreeHostX11::SetOpacity(unsigned char opacity) {
|
| +void DesktopWindowTreeHostX11::SetOpacity(float opacity) {
|
| // X server opacity is in terms of 32 bit unsigned int space, and counts from
|
| // the opposite direction.
|
| // XChangeProperty() expects "cardinality" to be long.
|
| - unsigned long cardinality = opacity * 0x1010101;
|
| + unsigned long cardinality = static_cast<int>(opacity * 255) * 0x1010101;
|
|
|
| if (cardinality == 0xffffffff) {
|
| XDeleteProperty(xdisplay_, xwindow_,
|
|
|