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

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

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)
Patch Set: Clarify comment. Created 3 years, 5 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
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/window_tree_host_x11.h" 5 #include "ui/aura/window_tree_host_x11.h"
6 6
7 #include <strings.h> 7 #include <strings.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/extensions/Xrandr.h> 10 #include <X11/extensions/Xrandr.h>
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 if (xev->type == EnterNotify) { 245 if (xev->type == EnterNotify) {
246 aura::Window* root_window = window(); 246 aura::Window* root_window = window();
247 client::CursorClient* cursor_client = 247 client::CursorClient* cursor_client =
248 client::GetCursorClient(root_window); 248 client::GetCursorClient(root_window);
249 if (cursor_client) { 249 if (cursor_client) {
250 const display::Display display = 250 const display::Display display =
251 display::Screen::GetScreen()->GetDisplayNearestWindow( 251 display::Screen::GetScreen()->GetDisplayNearestWindow(
252 root_window); 252 root_window);
253 cursor_client->SetDisplay(display); 253 cursor_client->SetDisplay(display);
254 } 254 }
255 // EnterNotify creates ET_MOUSE_MOVE. Mark as synthesized as this is
256 // not a real mouse move event.
257 mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED);
258 } 255 }
259 256
260 TranslateAndDispatchLocatedEvent(&mouse_event); 257 TranslateAndDispatchLocatedEvent(&mouse_event);
261 break; 258 break;
262 } 259 }
263 case ui::ET_MOUSEWHEEL: { 260 case ui::ET_MOUSEWHEEL: {
264 ui::MouseWheelEvent mouseev(xev); 261 ui::MouseWheelEvent mouseev(xev);
265 TranslateAndDispatchLocatedEvent(&mouseev); 262 TranslateAndDispatchLocatedEvent(&mouseev);
266 break; 263 break;
267 } 264 }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 ui::LocatedEvent* event) { 550 ui::LocatedEvent* event) {
554 SendEventToSink(event); 551 SendEventToSink(event);
555 } 552 }
556 553
557 // static 554 // static
558 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) { 555 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds_in_pixels) {
559 return new WindowTreeHostX11(bounds_in_pixels); 556 return new WindowTreeHostX11(bounds_in_pixels);
560 } 557 }
561 558
562 } // namespace aura 559 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/env_input_state_controller.cc ('k') | ui/events/platform/x11/x11_event_source_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698