Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 const gfx::Display display_src = 1538 const gfx::Display display_src =
1539 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window()); 1539 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(window());
1540 const gfx::Display display_dest = 1540 const gfx::Display display_dest =
1541 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window()); 1541 gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow(host->window());
1542 DCHECK_EQ(display_src.device_scale_factor(), 1542 DCHECK_EQ(display_src.device_scale_factor(),
1543 display_dest.device_scale_factor()); 1543 display_dest.device_scale_factor());
1544 gfx::Vector2d offset = GetLocationOnNativeScreen() - 1544 gfx::Vector2d offset = GetLocationOnNativeScreen() -
1545 host->GetLocationOnNativeScreen(); 1545 host->GetLocationOnNativeScreen();
1546 gfx::PointF location_in_pixel_in_host = 1546 gfx::PointF location_in_pixel_in_host =
1547 located_event->location_f() + gfx::Vector2dF(offset); 1547 located_event->location_f() + gfx::Vector2dF(offset);
1548 located_event->set_location(location_in_pixel_in_host); 1548 located_event->set_location_f(location_in_pixel_in_host);
1549 } 1549 }
1550 1550
1551 void DesktopWindowTreeHostX11::ResetWindowRegion() { 1551 void DesktopWindowTreeHostX11::ResetWindowRegion() {
1552 // If a custom window shape was supplied then apply it. 1552 // If a custom window shape was supplied then apply it.
1553 if (custom_window_shape_) { 1553 if (custom_window_shape_) {
1554 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0, 1554 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0,
1555 window_shape_.get(), false); 1555 window_shape_.get(), false);
1556 return; 1556 return;
1557 } 1557 }
1558 1558
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 if (linux_ui) { 2065 if (linux_ui) {
2066 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2066 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2067 if (native_theme) 2067 if (native_theme)
2068 return native_theme; 2068 return native_theme;
2069 } 2069 }
2070 2070
2071 return ui::NativeTheme::instance(); 2071 return ui::NativeTheme::instance();
2072 } 2072 }
2073 2073
2074 } // namespace views 2074 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl_unittest.cc ('k') | win8/metro_driver/chrome_app_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698