OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 Region region = gfx::CreateRegionFromSkPath(window_mask); | 1046 Region region = gfx::CreateRegionFromSkPath(window_mask); |
1047 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, | 1047 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, |
1048 0, 0, region, false); | 1048 0, 0, region, false); |
1049 XDestroyRegion(region); | 1049 XDestroyRegion(region); |
1050 return; | 1050 return; |
1051 } | 1051 } |
1052 } | 1052 } |
1053 | 1053 |
1054 // If we didn't set the shape for any reason, reset the shaping information | 1054 // If we didn't set the shape for any reason, reset the shaping information |
1055 // by ShapeSet-ing with our bounds rect. | 1055 // by ShapeSet-ing with our bounds rect. |
1056 XRectangle r = { 0, 0, bounds_.width(), bounds_.height() }; | 1056 XRectangle r = { 0, 0, static_cast<unsigned short>(bounds_.width()), |
| 1057 static_cast<unsigned short>(bounds_.height()) }; |
1057 XShapeCombineRectangles(xdisplay_, xwindow_, ShapeBounding, | 1058 XShapeCombineRectangles(xdisplay_, xwindow_, ShapeBounding, |
1058 0, 0, &r, 1, ShapeSet, YXBanded); | 1059 0, 0, &r, 1, ShapeSet, YXBanded); |
1059 } | 1060 } |
1060 | 1061 |
1061 std::list<XID>& DesktopRootWindowHostX11::open_windows() { | 1062 std::list<XID>& DesktopRootWindowHostX11::open_windows() { |
1062 if (!open_windows_) | 1063 if (!open_windows_) |
1063 open_windows_ = new std::list<XID>(); | 1064 open_windows_ = new std::list<XID>(); |
1064 return *open_windows_; | 1065 return *open_windows_; |
1065 } | 1066 } |
1066 | 1067 |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1397 if (linux_ui) { | 1398 if (linux_ui) { |
1398 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); | 1399 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); |
1399 if (native_theme) | 1400 if (native_theme) |
1400 return native_theme; | 1401 return native_theme; |
1401 } | 1402 } |
1402 | 1403 |
1403 return ui::NativeTheme::instance(); | 1404 return ui::NativeTheme::instance(); |
1404 } | 1405 } |
1405 | 1406 |
1406 } // namespace views | 1407 } // namespace views |
OLD | NEW |