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

Side by Side Diff: ash/host/ash_window_tree_host_x11.cc

Issue 270803002: Take overscan into account when handling passive grab (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/host/ash_window_tree_host_x11.h" 5 #include "ash/host/ash_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/Xfixes.h> 7 #include <X11/extensions/Xfixes.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/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 touch_calibrate_->Calibrate(touchev, bounds()); 333 touch_calibrate_->Calibrate(touchev, bounds());
334 #endif // defined(USE_XI2_MT) 334 #endif // defined(USE_XI2_MT)
335 } 335 }
336 break; 336 break;
337 } 337 }
338 default: { 338 default: {
339 aura::Window* root_window = window(); 339 aura::Window* root_window = window();
340 aura::client::ScreenPositionClient* screen_position_client = 340 aura::client::ScreenPositionClient* screen_position_client =
341 aura::client::GetScreenPositionClient(root_window); 341 aura::client::GetScreenPositionClient(root_window);
342 gfx::Rect local(bounds().size()); 342 gfx::Rect local(bounds().size());
343 343 local.Inset(transformer_helper_.GetHostInsets());
344 if (screen_position_client && !local.Contains(event->location())) { 344 if (screen_position_client && !local.Contains(event->location())) {
345 gfx::Point location(event->location()); 345 gfx::Point location(event->location());
346 // In order to get the correct point in screen coordinates 346 // In order to get the correct point in screen coordinates
347 // during passive grab, we first need to find on which host window 347 // during passive grab, we first need to find on which host window
348 // the mouse is on, and find out the screen coordinates on that 348 // the mouse is on, and find out the screen coordinates on that
349 // host window, then convert it back to this host window's coordinate. 349 // host window, then convert it back to this host window's coordinate.
350 screen_position_client->ConvertHostPointToScreen(root_window, 350 screen_position_client->ConvertHostPointToScreen(root_window,
351 &location); 351 &location);
352 screen_position_client->ConvertPointFromScreen(root_window, &location); 352 screen_position_client->ConvertPointFromScreen(root_window, &location);
353 ConvertPointToHost(&location); 353 ConvertPointToHost(&location);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 1); 409 1);
410 } 410 }
411 } 411 }
412 } 412 }
413 413
414 AshWindowTreeHost* AshWindowTreeHost::Create(const gfx::Rect& initial_bounds) { 414 AshWindowTreeHost* AshWindowTreeHost::Create(const gfx::Rect& initial_bounds) {
415 return new AshWindowTreeHostX11(initial_bounds); 415 return new AshWindowTreeHostX11(initial_bounds);
416 } 416 }
417 417
418 } // namespace ash 418 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698