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

Side by Side Diff: ui/views/event_utils_aura.cc

Issue 23694022: Fixes bug where reposted events had wrong root coordinates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/event_utils.h" 5 #include "ui/views/event_utils.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/aura/client/screen_position_client.h" 9 #include "ui/aura/client/screen_position_client.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 23 matching lines...) Expand all
34 const ui::MouseEvent& orig = static_cast<const ui::MouseEvent&>(event); 34 const ui::MouseEvent& orig = static_cast<const ui::MouseEvent&>(event);
35 relocated.reset(new ui::MouseEvent(orig)); 35 relocated.reset(new ui::MouseEvent(orig));
36 } else if (event.IsGestureEvent()) { 36 } else if (event.IsGestureEvent()) {
37 const ui::GestureEvent& orig = static_cast<const ui::GestureEvent&>(event); 37 const ui::GestureEvent& orig = static_cast<const ui::GestureEvent&>(event);
38 relocated.reset(new ui::GestureEvent(orig)); 38 relocated.reset(new ui::GestureEvent(orig));
39 } else { 39 } else {
40 NOTREACHED(); 40 NOTREACHED();
41 return false; 41 return false;
42 } 42 }
43 relocated->set_location(root_loc); 43 relocated->set_location(root_loc);
44 relocated->set_root_location(root_loc);
44 45
45 root_window->RepostEvent(*relocated); 46 root_window->RepostEvent(*relocated);
46 return true; 47 return true;
47 } 48 }
48 49
49 } // namespace views 50 } // namespace views
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