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

Side by Side Diff: ui/aura/root_window.cc

Issue 10948020: Convert native mouse locations to the locations in screen coordinate in RootWindowHostLinux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | « chrome/browser/ui/ash/tabs/dock_info_ash.cc ('k') | ui/aura/root_window_host_linux.h » ('j') | 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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 case ui::ET_MOUSE_RELEASED: 1030 case ui::ET_MOUSE_RELEASED:
1031 mouse_pressed_handler_ = NULL; 1031 mouse_pressed_handler_ = NULL;
1032 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask & 1032 mouse_button_flags_ = event->flags() & kMouseButtonFlagMask &
1033 ~event->changed_button_flags(); 1033 ~event->changed_button_flags();
1034 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_); 1034 Env::GetInstance()->set_mouse_button_flags(mouse_button_flags_);
1035 break; 1035 break;
1036 default: 1036 default:
1037 break; 1037 break;
1038 } 1038 }
1039 if (target) { 1039 if (target) {
1040 int flags = event->flags();
1041 gfx::Point location_in_window = event->location();
1042 Window::ConvertPointToTarget(this, target, &location_in_window);
1043 if (IsNonClientLocation(target, location_in_window))
1044 flags |= ui::EF_IS_NON_CLIENT;
1045 event->set_flags(flags);
1046 event->ConvertLocationToTarget(static_cast<Window*>(this), target); 1040 event->ConvertLocationToTarget(static_cast<Window*>(this), target);
1041 if (IsNonClientLocation(target, event->location()))
1042 event->set_flags(event->flags() | ui::EF_IS_NON_CLIENT);
1047 return ProcessMouseEvent(target, event); 1043 return ProcessMouseEvent(target, event);
1048 } 1044 }
1049 return false; 1045 return false;
1050 } 1046 }
1051 1047
1052 void RootWindow::DispatchHeldMouseMove() { 1048 void RootWindow::DispatchHeldMouseMove() {
1053 if (held_mouse_move_.get()) { 1049 if (held_mouse_move_.get()) {
1054 // If a mouse move has been synthesized, the target location is suspect, 1050 // If a mouse move has been synthesized, the target location is suspect,
1055 // so drop the held event. 1051 // so drop the held event.
1056 if (!synthesize_mouse_move_) 1052 if (!synthesize_mouse_move_)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 void RootWindow::UnlockCompositor() { 1092 void RootWindow::UnlockCompositor() {
1097 DCHECK(compositor_lock_); 1093 DCHECK(compositor_lock_);
1098 compositor_lock_ = NULL; 1094 compositor_lock_ = NULL;
1099 if (draw_on_compositor_unlock_) { 1095 if (draw_on_compositor_unlock_) {
1100 draw_on_compositor_unlock_ = false; 1096 draw_on_compositor_unlock_ = false;
1101 ScheduleDraw(); 1097 ScheduleDraw();
1102 } 1098 }
1103 } 1099 }
1104 1100
1105 } // namespace aura 1101 } // namespace aura
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/tabs/dock_info_ash.cc ('k') | ui/aura/root_window_host_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698