| OLD | NEW |
| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 if (xev->type == EnterNotify || | 359 if (xev->type == EnterNotify || |
| 360 xev->type == LeaveNotify || | 360 xev->type == LeaveNotify || |
| 361 xev->type == KeyPress || | 361 xev->type == KeyPress || |
| 362 xev->type == KeyRelease || | 362 xev->type == KeyRelease || |
| 363 xev->type == ButtonPress || | 363 xev->type == ButtonPress || |
| 364 xev->type == ButtonRelease || | 364 xev->type == ButtonRelease || |
| 365 xev->type == MotionNotify) { | 365 xev->type == MotionNotify) { |
| 366 switch (ui::EventTypeFromNative(xev)) { | 366 switch (ui::EventTypeFromNative(xev)) { |
| 367 case ui::ET_KEY_PRESSED: | 367 case ui::ET_KEY_PRESSED: |
| 368 case ui::ET_KEY_RELEASED: { | 368 case ui::ET_KEY_RELEASED: { |
| 369 ui::KeyEvent keydown_event(xev, false); | 369 ui::KeyEvent keydown_event(xev); |
| 370 SendEventToProcessor(&keydown_event); | 370 SendEventToProcessor(&keydown_event); |
| 371 break; | 371 break; |
| 372 } | 372 } |
| 373 case ui::ET_MOUSE_MOVED: | 373 case ui::ET_MOUSE_MOVED: |
| 374 case ui::ET_MOUSE_DRAGGED: | 374 case ui::ET_MOUSE_DRAGGED: |
| 375 case ui::ET_MOUSE_ENTERED: | 375 case ui::ET_MOUSE_ENTERED: |
| 376 case ui::ET_MOUSE_EXITED: | 376 case ui::ET_MOUSE_EXITED: |
| 377 case ui::ET_MOUSE_PRESSED: | 377 case ui::ET_MOUSE_PRESSED: |
| 378 case ui::ET_MOUSE_RELEASED: { | 378 case ui::ET_MOUSE_RELEASED: { |
| 379 ui::MouseEvent mouse_event(xev); | 379 ui::MouseEvent mouse_event(xev); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 } | 680 } |
| 681 case ui::ET_SCROLL_FLING_START: | 681 case ui::ET_SCROLL_FLING_START: |
| 682 case ui::ET_SCROLL_FLING_CANCEL: | 682 case ui::ET_SCROLL_FLING_CANCEL: |
| 683 case ui::ET_SCROLL: { | 683 case ui::ET_SCROLL: { |
| 684 ui::ScrollEvent scrollev(xev); | 684 ui::ScrollEvent scrollev(xev); |
| 685 SendEventToProcessor(&scrollev); | 685 SendEventToProcessor(&scrollev); |
| 686 break; | 686 break; |
| 687 } | 687 } |
| 688 case ui::ET_KEY_PRESSED: | 688 case ui::ET_KEY_PRESSED: |
| 689 case ui::ET_KEY_RELEASED: { | 689 case ui::ET_KEY_RELEASED: { |
| 690 ui::KeyEvent key_event(xev, false); | 690 ui::KeyEvent key_event(xev); |
| 691 SendEventToProcessor(&key_event); | 691 SendEventToProcessor(&key_event); |
| 692 break; | 692 break; |
| 693 } | 693 } |
| 694 case ui::ET_UMA_DATA: | 694 case ui::ET_UMA_DATA: |
| 695 break; | 695 break; |
| 696 case ui::ET_UNKNOWN: | 696 case ui::ET_UNKNOWN: |
| 697 break; | 697 break; |
| 698 default: | 698 default: |
| 699 NOTREACHED(); | 699 NOTREACHED(); |
| 700 } | 700 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 727 } | 727 } |
| 728 | 728 |
| 729 namespace test { | 729 namespace test { |
| 730 | 730 |
| 731 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { | 731 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { |
| 732 default_override_redirect = override_redirect; | 732 default_override_redirect = override_redirect; |
| 733 } | 733 } |
| 734 | 734 |
| 735 } // namespace test | 735 } // namespace test |
| 736 } // namespace aura | 736 } // namespace aura |
| OLD | NEW |