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

Side by Side Diff: ui/gl/gl_surface_glx.cc

Issue 667823002: PlatformEventDispatcher::DispatchEvent() should return a PostDispatchAction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: Fix platform_event_source_unittest.cc Created 6 years, 2 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
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/ozone/platform/caca/caca_window.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 extern "C" { 5 extern "C" {
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 } 7 }
8 8
9 #include "ui/gl/gl_surface_glx.h" 9 #include "ui/gl/gl_surface_glx.h"
10 10
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 event_source->RemovePlatformEventDispatcher(this); 477 event_source->RemovePlatformEventDispatcher(this);
478 XDestroyWindow(g_display, window_); 478 XDestroyWindow(g_display, window_);
479 XFlush(g_display); 479 XFlush(g_display);
480 } 480 }
481 } 481 }
482 482
483 bool NativeViewGLSurfaceGLX::CanDispatchEvent(const ui::PlatformEvent& event) { 483 bool NativeViewGLSurfaceGLX::CanDispatchEvent(const ui::PlatformEvent& event) {
484 return event->type == Expose && event->xexpose.window == window_; 484 return event->type == Expose && event->xexpose.window == window_;
485 } 485 }
486 486
487 uint32_t NativeViewGLSurfaceGLX::DispatchEvent(const ui::PlatformEvent& event) { 487 ui::PostDispatchAction NativeViewGLSurfaceGLX::DispatchEvent(
488 const ui::PlatformEvent& event) {
488 XEvent forwarded_event = *event; 489 XEvent forwarded_event = *event;
489 forwarded_event.xexpose.window = parent_window_; 490 forwarded_event.xexpose.window = parent_window_;
490 XSendEvent(g_display, parent_window_, False, ExposureMask, 491 XSendEvent(g_display, parent_window_, False, ExposureMask,
491 &forwarded_event); 492 &forwarded_event);
492 XFlush(g_display); 493 XFlush(g_display);
493 return ui::POST_DISPATCH_STOP_PROPAGATION; 494 return ui::POST_DISPATCH_STOP_PROPAGATION;
494 } 495 }
495 496
496 bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size) { 497 bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size) {
497 size_ = size; 498 size_ = size;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 690
690 void* PbufferGLSurfaceGLX::GetConfig() { 691 void* PbufferGLSurfaceGLX::GetConfig() {
691 return config_; 692 return config_;
692 } 693 }
693 694
694 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 695 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
695 Destroy(); 696 Destroy();
696 } 697 }
697 698
698 } // namespace gfx 699 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/ozone/platform/caca/caca_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698