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_root_window_host_linux.h" | 5 #include "ui/views/widget/desktop_root_window_host_linux.h" |
6 | 6 |
7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
9 #include <X11/Xutil.h> | 9 #include <X11/Xutil.h> |
10 | 10 |
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 NOTIMPLEMENTED(); | 802 NOTIMPLEMENTED(); |
803 } | 803 } |
804 | 804 |
805 //////////////////////////////////////////////////////////////////////////////// | 805 //////////////////////////////////////////////////////////////////////////////// |
806 // DesktopRootWindowHostLinux, views::internal::InputMethodDelegate: | 806 // DesktopRootWindowHostLinux, views::internal::InputMethodDelegate: |
807 | 807 |
808 void DesktopRootWindowHostLinux::DispatchKeyEventPostIME( | 808 void DesktopRootWindowHostLinux::DispatchKeyEventPostIME( |
809 const ui::KeyEvent& key) { | 809 const ui::KeyEvent& key) { |
810 FocusManager* focus_manager = | 810 FocusManager* focus_manager = |
811 native_widget_delegate_->AsWidget()->GetFocusManager(); | 811 native_widget_delegate_->AsWidget()->GetFocusManager(); |
812 if (focus_manager) | |
813 focus_manager->MaybeResetMenuKeyState(key); | |
814 if (native_widget_delegate_->OnKeyEvent(key) || !focus_manager) | 812 if (native_widget_delegate_->OnKeyEvent(key) || !focus_manager) |
815 return; | 813 return; |
816 focus_manager->OnKeyEvent(key); | 814 focus_manager->OnKeyEvent(key); |
817 } | 815 } |
818 | 816 |
819 //////////////////////////////////////////////////////////////////////////////// | 817 //////////////////////////////////////////////////////////////////////////////// |
820 // DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation: | 818 // DesktopRootWindowHostLinux, MessageLoop::Dispatcher implementation: |
821 | 819 |
822 bool DesktopRootWindowHostLinux::Dispatch(const base::NativeEvent& event) { | 820 bool DesktopRootWindowHostLinux::Dispatch(const base::NativeEvent& event) { |
823 XEvent* xev = event; | 821 XEvent* xev = event; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 DesktopRootWindowHost* DesktopRootWindowHost::Create( | 1047 DesktopRootWindowHost* DesktopRootWindowHost::Create( |
1050 internal::NativeWidgetDelegate* native_widget_delegate, | 1048 internal::NativeWidgetDelegate* native_widget_delegate, |
1051 DesktopNativeWidgetAura* desktop_native_widget_aura, | 1049 DesktopNativeWidgetAura* desktop_native_widget_aura, |
1052 const gfx::Rect& initial_bounds) { | 1050 const gfx::Rect& initial_bounds) { |
1053 return new DesktopRootWindowHostLinux(native_widget_delegate, | 1051 return new DesktopRootWindowHostLinux(native_widget_delegate, |
1054 desktop_native_widget_aura, | 1052 desktop_native_widget_aura, |
1055 initial_bounds); | 1053 initial_bounds); |
1056 } | 1054 } |
1057 | 1055 |
1058 } // namespace views | 1056 } // namespace views |
OLD | NEW |