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

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

Issue 11411247: Support 3f swipe for tab scrubbing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // with one from the master and one from the slave so there will 522 // with one from the master and one from the slave so there will
523 // always be at least one pending. 523 // always be at least one pending.
524 if (!ui::TouchFactory::GetInstance()->ShouldProcessXI2Event(&next_event)) { 524 if (!ui::TouchFactory::GetInstance()->ShouldProcessXI2Event(&next_event)) {
525 XFreeEventData(display, &next_event.xcookie); 525 XFreeEventData(display, &next_event.xcookie);
526 XNextEvent(display, &next_event); 526 XNextEvent(display, &next_event);
527 continue; 527 continue;
528 } 528 }
529 529
530 if (next_event.type == GenericEvent && 530 if (next_event.type == GenericEvent &&
531 next_event.xgeneric.evtype == event_type && 531 next_event.xgeneric.evtype == event_type &&
532 !ui::GetScrollOffsets(&next_event, NULL, NULL)) { 532 !ui::GetScrollOffsets(&next_event, NULL, NULL, NULL)) {
533 XIDeviceEvent* next_xievent = 533 XIDeviceEvent* next_xievent =
534 static_cast<XIDeviceEvent*>(next_event.xcookie.data); 534 static_cast<XIDeviceEvent*>(next_event.xcookie.data);
535 #if defined(USE_XI2_MT) 535 #if defined(USE_XI2_MT)
536 float next_tracking_id = -1; 536 float next_tracking_id = -1;
537 if (event_type == XI_TouchUpdate) { 537 if (event_type == XI_TouchUpdate) {
538 // If this is a touch motion event (as opposed to mouse motion event), 538 // If this is a touch motion event (as opposed to mouse motion event),
539 // then make sure the events are from the same touch-point. 539 // then make sure the events are from the same touch-point.
540 if (!ui::ValuatorTracker::GetInstance()->ExtractValuator(next_event, 540 if (!ui::ValuatorTracker::GetInstance()->ExtractValuator(next_event,
541 ui::ValuatorTracker::VAL_TRACKING_ID, &next_tracking_id)) 541 ui::ValuatorTracker::VAL_TRACKING_ID, &next_tracking_id))
542 next_tracking_id = -1; 542 next_tracking_id = -1;
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 << "request_code " << static_cast<int>(error_event.request_code) << ", " 1721 << "request_code " << static_cast<int>(error_event.request_code) << ", "
1722 << "minor_code " << static_cast<int>(error_event.minor_code) 1722 << "minor_code " << static_cast<int>(error_event.minor_code)
1723 << " (" << request_str << ")"; 1723 << " (" << request_str << ")";
1724 } 1724 }
1725 1725
1726 // ---------------------------------------------------------------------------- 1726 // ----------------------------------------------------------------------------
1727 // End of x11_util_internal.h 1727 // End of x11_util_internal.h
1728 1728
1729 1729
1730 } // namespace ui 1730 } // namespace ui
OLDNEW
« chrome/browser/ui/views/ash/tab_scrubber.cc ('K') | « ui/base/x/events_x.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698