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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)
Patch Set: Investigate use-after-free. Created 3 years, 6 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
« no previous file with comments | « ui/aura/window_event_dispatcher.cc ('k') | no next file » | 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/views/widget/desktop_aura/desktop_window_tree_host_x11.h" 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/shape.h> 7 #include <X11/extensions/shape.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xregion.h> 10 #include <X11/Xregion.h>
(...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 switch (xev->type) { 1911 switch (xev->type) {
1912 case EnterNotify: 1912 case EnterNotify:
1913 case LeaveNotify: { 1913 case LeaveNotify: {
1914 OnCrossingEvent(xev->type == EnterNotify, xev->xcrossing.focus, 1914 OnCrossingEvent(xev->type == EnterNotify, xev->xcrossing.focus,
1915 xev->xcrossing.mode, xev->xcrossing.detail); 1915 xev->xcrossing.mode, xev->xcrossing.detail);
1916 1916
1917 // Ignore EventNotify and LeaveNotify events from children of |xwindow_|. 1917 // Ignore EventNotify and LeaveNotify events from children of |xwindow_|.
1918 // NativeViewGLSurfaceGLX adds a child to |xwindow_|. 1918 // NativeViewGLSurfaceGLX adds a child to |xwindow_|.
1919 if (xev->xcrossing.detail != NotifyInferior) { 1919 if (xev->xcrossing.detail != NotifyInferior) {
1920 ui::MouseEvent mouse_event(xev); 1920 ui::MouseEvent mouse_event(xev);
1921 // EnterNotify creates ET_MOUSE_MOVED. Mark as synthesized as this is
1922 // not a real mouse move event.
1923 if (xev->type == EnterNotify)
1924 mouse_event.set_flags(mouse_event.flags() | ui::EF_IS_SYNTHESIZED);
sadrul 2017/06/16 16:03:36 Looks like we are always doing this [1, 2]. Can we
Kevin McNee 2017/06/29 22:41:42 Done.
1921 DispatchMouseEvent(&mouse_event); 1925 DispatchMouseEvent(&mouse_event);
1922 } 1926 }
1923 break; 1927 break;
1924 } 1928 }
1925 case Expose: { 1929 case Expose: {
1926 gfx::Rect damage_rect_in_pixels(xev->xexpose.x, xev->xexpose.y, 1930 gfx::Rect damage_rect_in_pixels(xev->xexpose.x, xev->xexpose.y,
1927 xev->xexpose.width, xev->xexpose.height); 1931 xev->xexpose.width, xev->xexpose.height);
1928 compositor()->ScheduleRedrawRect(damage_rect_in_pixels); 1932 compositor()->ScheduleRedrawRect(damage_rect_in_pixels);
1929 break; 1933 break;
1930 } 1934 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2280 2284
2281 // static 2285 // static
2282 DesktopWindowTreeHost* DesktopWindowTreeHost::Create( 2286 DesktopWindowTreeHost* DesktopWindowTreeHost::Create(
2283 internal::NativeWidgetDelegate* native_widget_delegate, 2287 internal::NativeWidgetDelegate* native_widget_delegate,
2284 DesktopNativeWidgetAura* desktop_native_widget_aura) { 2288 DesktopNativeWidgetAura* desktop_native_widget_aura) {
2285 return new DesktopWindowTreeHostX11(native_widget_delegate, 2289 return new DesktopWindowTreeHostX11(native_widget_delegate,
2286 desktop_native_widget_aura); 2290 desktop_native_widget_aura);
2287 } 2291 }
2288 2292
2289 } // namespace views 2293 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/window_event_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698