| 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 "ui/aura/root_window_host.h" | 5 #include "ui/aura/root_window_host.h" |
| 6 | 6 |
| 7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 | 9 |
| 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 CheckXEventForConsistency(xev); | 388 CheckXEventForConsistency(xev); |
| 389 | 389 |
| 390 switch (xev->type) { | 390 switch (xev->type) { |
| 391 case Expose: | 391 case Expose: |
| 392 root_window_->ScheduleDraw(); | 392 root_window_->ScheduleDraw(); |
| 393 handled = true; | 393 handled = true; |
| 394 break; | 394 break; |
| 395 case KeyPress: { | 395 case KeyPress: { |
| 396 KeyEvent keydown_event(xev, false); | 396 KeyEvent keydown_event(xev, false); |
| 397 handled = root_window_->DispatchKeyEvent(&keydown_event); | 397 handled = root_window_->DispatchKeyEvent(&keydown_event); |
| 398 if (ShouldSendCharEventForKeyboardCode(keydown_event.key_code())) { | |
| 399 KeyEvent char_event(xev, true); | |
| 400 handled |= root_window_->DispatchKeyEvent(&char_event); | |
| 401 } | |
| 402 break; | 398 break; |
| 403 } | 399 } |
| 404 case KeyRelease: { | 400 case KeyRelease: { |
| 405 KeyEvent keyup_event(xev, false); | 401 KeyEvent keyup_event(xev, false); |
| 406 handled = root_window_->DispatchKeyEvent(&keyup_event); | 402 handled = root_window_->DispatchKeyEvent(&keyup_event); |
| 407 break; | 403 break; |
| 408 } | 404 } |
| 409 case ButtonPress: | 405 case ButtonPress: |
| 410 case ButtonRelease: { | 406 case ButtonRelease: { |
| 411 MouseEvent mouseev(xev); | 407 MouseEvent mouseev(xev); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 return new RootWindowHostLinux(bounds); | 672 return new RootWindowHostLinux(bounds); |
| 677 } | 673 } |
| 678 | 674 |
| 679 // static | 675 // static |
| 680 gfx::Size RootWindowHost::GetNativeScreenSize() { | 676 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 681 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 677 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
| 682 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 678 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 683 } | 679 } |
| 684 | 680 |
| 685 } // namespace aura | 681 } // namespace aura |
| OLD | NEW |