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

Side by Side Diff: ui/ozone/platform/caca/caca_event_source.cc

Issue 1456163002: ozone: caca: Fix MouseEvent ctor & add PlatformWindow::SetWindowTitle override (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | ui/ozone/platform/caca/caca_window.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 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
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
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/caca/caca_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698