Chromium Code Reviews| 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_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_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 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1794 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); | 1794 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); |
| 1795 const display::Display display_dest = | 1795 const display::Display display_dest = |
| 1796 display::Screen::GetScreen()->GetDisplayNearestWindow(host->window()); | 1796 display::Screen::GetScreen()->GetDisplayNearestWindow(host->window()); |
| 1797 DCHECK_EQ(display_src.device_scale_factor(), | 1797 DCHECK_EQ(display_src.device_scale_factor(), |
| 1798 display_dest.device_scale_factor()); | 1798 display_dest.device_scale_factor()); |
| 1799 gfx::Vector2d offset = GetLocationOnNativeScreen() - | 1799 gfx::Vector2d offset = GetLocationOnNativeScreen() - |
| 1800 host->GetLocationOnNativeScreen(); | 1800 host->GetLocationOnNativeScreen(); |
| 1801 gfx::PointF location_in_pixel_in_host = | 1801 gfx::PointF location_in_pixel_in_host = |
| 1802 located_event->location_f() + gfx::Vector2dF(offset); | 1802 located_event->location_f() + gfx::Vector2dF(offset); |
| 1803 located_event->set_location_f(location_in_pixel_in_host); | 1803 located_event->set_location_f(location_in_pixel_in_host); |
| 1804 located_event->set_root_location_f(location_in_pixel_in_host); | |
|
rjkroege
2016/10/10 20:49:31
is set_root_location_f in DIP or DDP? In screen sp
sadrul
2016/10/11 15:13:37
crbug.com/608547 is for this specific case, to rep
| |
| 1804 } | 1805 } |
| 1805 | 1806 |
| 1806 void DesktopWindowTreeHostX11::ResetWindowRegion() { | 1807 void DesktopWindowTreeHostX11::ResetWindowRegion() { |
| 1807 // If a custom window shape was supplied then apply it. | 1808 // If a custom window shape was supplied then apply it. |
| 1808 if (custom_window_shape_) { | 1809 if (custom_window_shape_) { |
| 1809 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0, | 1810 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0, |
| 1810 window_shape_.get(), false); | 1811 window_shape_.get(), false); |
| 1811 return; | 1812 return; |
| 1812 } | 1813 } |
| 1813 | 1814 |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2347 if (linux_ui) { | 2348 if (linux_ui) { |
| 2348 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 2349 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
| 2349 if (native_theme) | 2350 if (native_theme) |
| 2350 return native_theme; | 2351 return native_theme; |
| 2351 } | 2352 } |
| 2352 | 2353 |
| 2353 return ui::NativeThemeAura::instance(); | 2354 return ui::NativeThemeAura::instance(); |
| 2354 } | 2355 } |
| 2355 | 2356 |
| 2356 } // namespace views | 2357 } // namespace views |
| OLD | NEW |