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

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

Issue 8815004: Aura: delay draw on Expose to avoid getting behind (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« ui/aura/desktop.h ('K') | « ui/aura/desktop.h ('k') | no next file » | 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/desktop_host.h" 5 #include "ui/aura/desktop_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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( 361 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch(
362 XEvent* xev) { 362 XEvent* xev) {
363 bool handled = false; 363 bool handled = false;
364 364
365 CheckXEventForConsistency(xev); 365 CheckXEventForConsistency(xev);
366 366
367 switch (xev->type) { 367 switch (xev->type) {
368 case Expose: 368 case Expose:
369 desktop_->Draw(); 369 desktop_->ScheduleDraw();
370 handled = true; 370 handled = true;
371 break; 371 break;
372 case KeyPress: { 372 case KeyPress: {
373 KeyEvent keydown_event(xev, false); 373 KeyEvent keydown_event(xev, false);
374 handled = desktop_->DispatchKeyEvent(&keydown_event); 374 handled = desktop_->DispatchKeyEvent(&keydown_event);
375 if (ShouldSendCharEventForKeyboardCode(keydown_event.key_code())) { 375 if (ShouldSendCharEventForKeyboardCode(keydown_event.key_code())) {
376 KeyEvent char_event(xev, true); 376 KeyEvent char_event(xev, true);
377 handled |= desktop_->DispatchKeyEvent(&char_event); 377 handled |= desktop_->DispatchKeyEvent(&char_event);
378 } 378 }
379 break; 379 break;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 return new DesktopHostLinux(bounds); 609 return new DesktopHostLinux(bounds);
610 } 610 }
611 611
612 // static 612 // static
613 gfx::Size DesktopHost::GetNativeScreenSize() { 613 gfx::Size DesktopHost::GetNativeScreenSize() {
614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay();
615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
616 } 616 }
617 617
618 } // namespace aura 618 } // namespace aura
OLDNEW
« ui/aura/desktop.h ('K') | « ui/aura/desktop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698