Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Side by Side Diff: ui/aura/root_window_host_linux.cc

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to ash/ime/ Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/test/event_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/aura/test/event_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698