| 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 CheckXEventForConsistency(xev); | 370 CheckXEventForConsistency(xev); |
| 371 | 371 |
| 372 switch (xev->type) { | 372 switch (xev->type) { |
| 373 case Expose: | 373 case Expose: |
| 374 root_window_->ScheduleDraw(); | 374 root_window_->ScheduleDraw(); |
| 375 handled = true; | 375 handled = true; |
| 376 break; | 376 break; |
| 377 case KeyPress: { | 377 case KeyPress: { |
| 378 KeyEvent keydown_event(xev, false); | 378 KeyEvent keydown_event(xev, false); |
| 379 handled = root_window_->DispatchKeyEvent(&keydown_event); | 379 handled = root_window_->DispatchKeyEvent(&keydown_event); |
| 380 if (ShouldSendCharEventForKeyboardCode(keydown_event.key_code())) { | |
| 381 KeyEvent char_event(xev, true); | |
| 382 handled |= root_window_->DispatchKeyEvent(&char_event); | |
| 383 } | |
| 384 break; | 380 break; |
| 385 } | 381 } |
| 386 case KeyRelease: { | 382 case KeyRelease: { |
| 387 KeyEvent keyup_event(xev, false); | 383 KeyEvent keyup_event(xev, false); |
| 388 handled = root_window_->DispatchKeyEvent(&keyup_event); | 384 handled = root_window_->DispatchKeyEvent(&keyup_event); |
| 389 break; | 385 break; |
| 390 } | 386 } |
| 391 case ButtonPress: | 387 case ButtonPress: |
| 392 case ButtonRelease: { | 388 case ButtonRelease: { |
| 393 MouseEvent mouseev(xev); | 389 MouseEvent mouseev(xev); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 return new RootWindowHostLinux(bounds); | 626 return new RootWindowHostLinux(bounds); |
| 631 } | 627 } |
| 632 | 628 |
| 633 // static | 629 // static |
| 634 gfx::Size RootWindowHost::GetNativeScreenSize() { | 630 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 635 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 631 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
| 636 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 632 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 637 } | 633 } |
| 638 | 634 |
| 639 } // namespace aura | 635 } // namespace aura |
| OLD | NEW |