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

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: moved IME code to aura_shell, not ready for review though Created 9 years 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
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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698