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

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

Issue 22264002: Mark mouse events created for Enter/Leave notify as synthesized as they're not real mouse events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | ui/views/corewm/compound_event_filter.cc » ('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_host_x11.h" 5 #include "ui/aura/root_window_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/Xfixes.h> 9 #include <X11/extensions/Xfixes.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) { 454 bool RootWindowHostX11::Dispatch(const base::NativeEvent& event) {
455 XEvent* xev = event; 455 XEvent* xev = event;
456 456
457 if (FindEventTarget(event) == x_root_window_) 457 if (FindEventTarget(event) == x_root_window_)
458 return DispatchEventForRootWindow(event); 458 return DispatchEventForRootWindow(event);
459 459
460 switch (xev->type) { 460 switch (xev->type) {
461 case EnterNotify: 461 case EnterNotify:
462 case LeaveNotify: { 462 case LeaveNotify: {
463 ui::MouseEvent mouse_event(xev); 463 ui::MouseEvent mouse_event(xev);
464 // Mark as synthesized as this is not real mouse event.
465 mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED);
sky 2013/08/06 21:11:05 This seems like a real event to me. Why the synthe
sadrul 2013/08/06 21:18:51 My understanding is the EF_IS_SYNTHESIZED is set h
oshima 2013/08/06 21:20:32 This creates mouse MOVE event, even though mouse d
sky 2013/08/06 21:37:47 Then should the synthesized be on the move and not
464 TranslateAndDispatchMouseEvent(&mouse_event); 466 TranslateAndDispatchMouseEvent(&mouse_event);
465 break; 467 break;
466 } 468 }
467 case Expose: { 469 case Expose: {
468 gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y, 470 gfx::Rect damage_rect(xev->xexpose.x, xev->xexpose.y,
469 xev->xexpose.width, xev->xexpose.height); 471 xev->xexpose.width, xev->xexpose.height);
470 delegate_->AsRootWindow()->ScheduleRedrawRect(damage_rect); 472 delegate_->AsRootWindow()->ScheduleRedrawRect(damage_rect);
471 break; 473 break;
472 } 474 }
473 case KeyPress: { 475 case KeyPress: {
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 } 1141 }
1140 1142
1141 namespace test { 1143 namespace test {
1142 1144
1143 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { 1145 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {
1144 default_override_redirect = override_redirect; 1146 default_override_redirect = override_redirect;
1145 } 1147 }
1146 1148
1147 } // namespace test 1149 } // namespace test
1148 } // namespace aura 1150 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/views/corewm/compound_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698