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

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

Issue 1908913002: Revert of mus: Fix event transformation in client code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
« no previous file with comments | « ui/views/mus/window_tree_host_mus.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xregion.h> 8 #include <X11/Xregion.h>
9 #include <X11/Xutil.h> 9 #include <X11/Xutil.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window()); 1538 gfx::Screen::GetScreen()->GetDisplayNearestWindow(window());
1539 const gfx::Display display_dest = 1539 const gfx::Display display_dest =
1540 gfx::Screen::GetScreen()->GetDisplayNearestWindow(host->window()); 1540 gfx::Screen::GetScreen()->GetDisplayNearestWindow(host->window());
1541 DCHECK_EQ(display_src.device_scale_factor(), 1541 DCHECK_EQ(display_src.device_scale_factor(),
1542 display_dest.device_scale_factor()); 1542 display_dest.device_scale_factor());
1543 gfx::Vector2d offset = GetLocationOnNativeScreen() - 1543 gfx::Vector2d offset = GetLocationOnNativeScreen() -
1544 host->GetLocationOnNativeScreen(); 1544 host->GetLocationOnNativeScreen();
1545 gfx::PointF location_in_pixel_in_host = 1545 gfx::PointF location_in_pixel_in_host =
1546 located_event->location_f() + gfx::Vector2dF(offset); 1546 located_event->location_f() + gfx::Vector2dF(offset);
1547 located_event->set_location_f(location_in_pixel_in_host); 1547 located_event->set_location_f(location_in_pixel_in_host);
1548 located_event->set_root_location_f(location_in_pixel_in_host);
1549 } 1548 }
1550 1549
1551 void DesktopWindowTreeHostX11::ResetWindowRegion() { 1550 void DesktopWindowTreeHostX11::ResetWindowRegion() {
1552 // If a custom window shape was supplied then apply it. 1551 // If a custom window shape was supplied then apply it.
1553 if (custom_window_shape_) { 1552 if (custom_window_shape_) {
1554 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0, 1553 XShapeCombineRegion(xdisplay_, xwindow_, ShapeBounding, 0, 0,
1555 window_shape_.get(), false); 1554 window_shape_.get(), false);
1556 return; 1555 return;
1557 } 1556 }
1558 1557
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 if (linux_ui) { 2039 if (linux_ui) {
2041 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); 2040 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
2042 if (native_theme) 2041 if (native_theme)
2043 return native_theme; 2042 return native_theme;
2044 } 2043 }
2045 2044
2046 return ui::NativeThemeAura::instance(); 2045 return ui::NativeThemeAura::instance();
2047 } 2046 }
2048 2047
2049 } // namespace views 2048 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/window_tree_host_mus.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698