| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "remoting/host/local_input_monitor_thread_linux.h" | 5 #include "remoting/host/local_input_monitor_thread_linux.h" |
| 6 | 6 |
| 7 #include <sys/select.h> | 7 #include <sys/select.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 #define XK_MISCELLANY | 9 #define XK_MISCELLANY |
| 10 #include <X11/keysymdef.h> | 10 #include <X11/keysymdef.h> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 host_->LocalMouseMoved(pos); | 166 host_->LocalMouseMoved(pos); |
| 167 } | 167 } |
| 168 | 168 |
| 169 void LocalInputMonitorThread::LocalKeyPressed(int key_code, bool down) { | 169 void LocalInputMonitorThread::LocalKeyPressed(int key_code, bool down) { |
| 170 int key_sym = XKeycodeToKeysym(display_, key_code, 0); | 170 int key_sym = XKeycodeToKeysym(display_, key_code, 0); |
| 171 if (key_sym == XK_Control_L || key_sym == XK_Control_R) { | 171 if (key_sym == XK_Control_L || key_sym == XK_Control_R) { |
| 172 ctrl_pressed_ = down; | 172 ctrl_pressed_ = down; |
| 173 } else if (key_sym == XK_Alt_L || key_sym == XK_Alt_R) { | 173 } else if (key_sym == XK_Alt_L || key_sym == XK_Alt_R) { |
| 174 alt_pressed_ = down; | 174 alt_pressed_ = down; |
| 175 } else if (alt_pressed_ && ctrl_pressed_ && key_sym == XK_Escape && down) { | 175 } else if (alt_pressed_ && ctrl_pressed_ && key_sym == XK_Escape && down) { |
| 176 host_->Shutdown(NULL); | 176 host_->Shutdown(base::Closure()); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace remoting | 180 } // namespace remoting |
| OLD | NEW |