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

Side by Side Diff: ui/base/x/x11_util.cc

Issue 12208118: Add support for ordinal scroll amounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix interactive_ui_tests failure Created 7 years, 10 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 | « ui/base/x/events_x.cc ('k') | ui/views/widget/widget_unittest.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 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 10
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // with one from the master and one from the slave so there will 569 // with one from the master and one from the slave so there will
570 // always be at least one pending. 570 // always be at least one pending.
571 if (!ui::TouchFactory::GetInstance()->ShouldProcessXI2Event(&next_event)) { 571 if (!ui::TouchFactory::GetInstance()->ShouldProcessXI2Event(&next_event)) {
572 XFreeEventData(display, &next_event.xcookie); 572 XFreeEventData(display, &next_event.xcookie);
573 XNextEvent(display, &next_event); 573 XNextEvent(display, &next_event);
574 continue; 574 continue;
575 } 575 }
576 576
577 if (next_event.type == GenericEvent && 577 if (next_event.type == GenericEvent &&
578 next_event.xgeneric.evtype == event_type && 578 next_event.xgeneric.evtype == event_type &&
579 !ui::GetScrollOffsets(&next_event, NULL, NULL, NULL)) { 579 !ui::GetScrollOffsets(&next_event, NULL, NULL, NULL, NULL, NULL)) {
580 XIDeviceEvent* next_xievent = 580 XIDeviceEvent* next_xievent =
581 static_cast<XIDeviceEvent*>(next_event.xcookie.data); 581 static_cast<XIDeviceEvent*>(next_event.xcookie.data);
582 #if defined(USE_XI2_MT) 582 #if defined(USE_XI2_MT)
583 float next_tracking_id = -1; 583 float next_tracking_id = -1;
584 if (event_type == XI_TouchUpdate) { 584 if (event_type == XI_TouchUpdate) {
585 // If this is a touch motion event (as opposed to mouse motion event), 585 // If this is a touch motion event (as opposed to mouse motion event),
586 // then make sure the events are from the same touch-point. 586 // then make sure the events are from the same touch-point.
587 if (!ui::ValuatorTracker::GetInstance()->ExtractValuator(next_event, 587 if (!ui::ValuatorTracker::GetInstance()->ExtractValuator(next_event,
588 ui::ValuatorTracker::VAL_TRACKING_ID, &next_tracking_id)) 588 ui::ValuatorTracker::VAL_TRACKING_ID, &next_tracking_id))
589 next_tracking_id = -1; 589 next_tracking_id = -1;
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1828 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1829 << "minor_code " << static_cast<int>(error_event.minor_code) 1829 << "minor_code " << static_cast<int>(error_event.minor_code)
1830 << " (" << request_str << ")"; 1830 << " (" << request_str << ")";
1831 } 1831 }
1832 1832
1833 // ---------------------------------------------------------------------------- 1833 // ----------------------------------------------------------------------------
1834 // End of x11_util_internal.h 1834 // End of x11_util_internal.h
1835 1835
1836 1836
1837 } // namespace ui 1837 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/events_x.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698