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

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

Issue 688253002: Implemented smooth scrolling using xinput2 in X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Applied sadrul's comments Created 5 years, 11 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 next_event.xmotion.subwindow == xev->xmotion.subwindow && 340 next_event.xmotion.subwindow == xev->xmotion.subwindow &&
341 next_event.xmotion.state == xev->xmotion.state) { 341 next_event.xmotion.state == xev->xmotion.state) {
342 XNextEvent(xev->xany.display, &last_event); 342 XNextEvent(xev->xany.display, &last_event);
343 xev = &last_event; 343 xev = &last_event;
344 } else { 344 } else {
345 break; 345 break;
346 } 346 }
347 } 347 }
348 } 348 }
349 349
350 if (xev->type == EnterNotify || xev->type == LeaveNotify) {
351 // Clear stored scroll data
352 ui::DeviceDataManagerX11::GetInstance()->InvalidateScrollClasses();
353 }
sadrul 2015/01/30 15:49:15 Can you move this into X11EventSource::DispatchEve
354
350 if ((xev->type == EnterNotify || xev->type == LeaveNotify) && 355 if ((xev->type == EnterNotify || xev->type == LeaveNotify) &&
351 xev->xcrossing.detail == NotifyInferior) { 356 xev->xcrossing.detail == NotifyInferior) {
352 // Ignore EventNotify and LeaveNotify events from children of |xwindow_|. 357 // Ignore EventNotify and LeaveNotify events from children of |xwindow_|.
353 // NativeViewGLSurfaceGLX adds a child to |xwindow_|. 358 // NativeViewGLSurfaceGLX adds a child to |xwindow_|.
354 // TODO(pkotwicz|tdanderson): Figure out whether the suppression is 359 // TODO(pkotwicz|tdanderson): Figure out whether the suppression is
355 // necessary. crbug.com/385716 360 // necessary. crbug.com/385716
356 return ui::POST_DISPATCH_STOP_PROPAGATION; 361 return ui::POST_DISPATCH_STOP_PROPAGATION;
357 } 362 }
358 363
359 if (xev->type == EnterNotify || 364 if (xev->type == EnterNotify ||
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } 732 }
728 733
729 namespace test { 734 namespace test {
730 735
731 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { 736 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {
732 default_override_redirect = override_redirect; 737 default_override_redirect = override_redirect;
733 } 738 }
734 739
735 } // namespace test 740 } // namespace test
736 } // namespace aura 741 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698