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

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

Issue 9773024: This patch implements Chromium's Aura gesture recognizer in terms of utouch-grail and utouch-frame … (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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/root_window_host_linux.h" 5 #include "ui/aura/root_window_host_linux.h"
6 6
7 #include <X11/cursorfont.h> 7 #include <X11/cursorfont.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (size_changed) 381 if (size_changed)
382 root_window_->OnHostResized(bounds.size()); 382 root_window_->OnHostResized(bounds.size());
383 handled = true; 383 handled = true;
384 break; 384 break;
385 } 385 }
386 case GenericEvent: { 386 case GenericEvent: {
387 ui::TouchFactory* factory = ui::TouchFactory::GetInstance(); 387 ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
388 if (!factory->ShouldProcessXI2Event(xev)) 388 if (!factory->ShouldProcessXI2Event(xev))
389 break; 389 break;
390 390
391 // Update utouch frame state
392 ui::TouchFactory::GetInstance()->ProcessXI2Event(xev);
393
394 // Update the device list if necessary.
395 if (xev->xgeneric.evtype == XI_HierarchyChanged) {
396 ui::UpdateDeviceList();
397 handled = true;
398 break;
399 }
400
391 ui::EventType type = ui::EventTypeFromNative(xev); 401 ui::EventType type = ui::EventTypeFromNative(xev);
392 // If this is a motion event we want to coalesce all pending motion 402 // If this is a motion event we want to coalesce all pending motion
393 // events that are at the top of the queue. 403 // events that are at the top of the queue.
394 XEvent last_event; 404 XEvent last_event;
395 int num_coalesced = 0; 405 int num_coalesced = 0;
396 406
397 switch (type) { 407 switch (type) {
398 case ui::ET_TOUCH_PRESSED: 408 case ui::ET_TOUCH_PRESSED:
399 case ui::ET_TOUCH_RELEASED: 409 case ui::ET_TOUCH_RELEASED:
400 case ui::ET_TOUCH_MOVED: { 410 case ui::ET_TOUCH_MOVED: {
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 return new RootWindowHostLinux(bounds); 650 return new RootWindowHostLinux(bounds);
641 } 651 }
642 652
643 // static 653 // static
644 gfx::Size RootWindowHost::GetNativeScreenSize() { 654 gfx::Size RootWindowHost::GetNativeScreenSize() {
645 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 655 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
646 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 656 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
647 } 657 }
648 658
649 } // namespace aura 659 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698