| OLD | NEW |
| 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 "ui/ozone/platform/caca/caca_event_source.h" | 5 #include "ui/ozone/platform/caca/caca_event_source.h" |
| 6 | 6 |
| 7 #include <caca.h> | 7 #include <caca.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 changed_flags = ModifierFromButton(*event); | 209 changed_flags = ModifierFromButton(*event); |
| 210 modifier_flags_ |= changed_flags; | 210 modifier_flags_ |= changed_flags; |
| 211 } else { | 211 } else { |
| 212 modifier_flags_ &= ~changed_flags; | 212 modifier_flags_ &= ~changed_flags; |
| 213 } | 213 } |
| 214 // On release the button pressed is removed from |modifier_flags_|, | 214 // On release the button pressed is removed from |modifier_flags_|, |
| 215 // but sending the event needs it set. | 215 // but sending the event needs it set. |
| 216 flags = modifier_flags_ | changed_flags; | 216 flags = modifier_flags_ | changed_flags; |
| 217 } | 217 } |
| 218 gfx::PointF location = TranslateLocation(last_cursor_location_, window); | 218 gfx::PointF location = TranslateLocation(last_cursor_location_, window); |
| 219 ui::MouseEvent mouse_event(type, location, location, EventTimeForNow(), | 219 ui::MouseEvent mouse_event(type, gfx::Point(), gfx::Point(), |
| 220 flags, changed_flags); | 220 EventTimeForNow(), flags, changed_flags); |
| 221 mouse_event.set_location_f(location); |
| 222 mouse_event.set_root_location_f(location); |
| 221 window->OnCacaEvent(&mouse_event); | 223 window->OnCacaEvent(&mouse_event); |
| 222 break; | 224 break; |
| 223 } | 225 } |
| 224 default: | 226 default: |
| 225 NOTIMPLEMENTED(); | 227 NOTIMPLEMENTED(); |
| 226 break; | 228 break; |
| 227 } | 229 } |
| 228 } | 230 } |
| 229 | 231 |
| 230 } // namespace ui | 232 } // namespace ui |
| OLD | NEW |