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/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 5 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
6 | 6 |
7 #include <X11/extensions/shape.h> | 7 #include <X11/extensions/shape.h> |
8 #include <X11/extensions/XInput2.h> | 8 #include <X11/extensions/XInput2.h> |
9 #include <X11/Xatom.h> | 9 #include <X11/Xatom.h> |
10 #include <X11/Xregion.h> | 10 #include <X11/Xregion.h> |
(...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 DispatchMouseEvent(&mouseev); | 1758 DispatchMouseEvent(&mouseev); |
1759 break; | 1759 break; |
1760 } | 1760 } |
1761 case ui::ET_SCROLL_FLING_START: | 1761 case ui::ET_SCROLL_FLING_START: |
1762 case ui::ET_SCROLL_FLING_CANCEL: | 1762 case ui::ET_SCROLL_FLING_CANCEL: |
1763 case ui::ET_SCROLL: { | 1763 case ui::ET_SCROLL: { |
1764 ui::ScrollEvent scrollev(xev); | 1764 ui::ScrollEvent scrollev(xev); |
1765 SendEventToProcessor(&scrollev); | 1765 SendEventToProcessor(&scrollev); |
1766 break; | 1766 break; |
1767 } | 1767 } |
| 1768 case ui::ET_KEY_PRESSED: |
| 1769 case ui::ET_KEY_RELEASED: { |
| 1770 ui::KeyEvent key_event(xev); |
| 1771 SendEventToProcessor(&key_event); |
| 1772 break; |
| 1773 } |
1768 case ui::ET_UNKNOWN: | 1774 case ui::ET_UNKNOWN: |
1769 break; | 1775 break; |
1770 default: | 1776 default: |
1771 NOTREACHED(); | 1777 NOTREACHED(); |
1772 } | 1778 } |
1773 | 1779 |
1774 // If we coalesced an event we need to free its cookie. | 1780 // If we coalesced an event we need to free its cookie. |
1775 if (num_coalesced > 0) | 1781 if (num_coalesced > 0) |
1776 XFreeEventData(xev->xgeneric.display, &last_event.xcookie); | 1782 XFreeEventData(xev->xgeneric.display, &last_event.xcookie); |
1777 break; | 1783 break; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 if (linux_ui) { | 1902 if (linux_ui) { |
1897 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); | 1903 ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window); |
1898 if (native_theme) | 1904 if (native_theme) |
1899 return native_theme; | 1905 return native_theme; |
1900 } | 1906 } |
1901 | 1907 |
1902 return ui::NativeTheme::instance(); | 1908 return ui::NativeTheme::instance(); |
1903 } | 1909 } |
1904 | 1910 |
1905 } // namespace views | 1911 } // namespace views |
OLD | NEW |