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

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

Issue 666673005: Explicitly coerce PostDispatchAction to uint32_t in DispatchEvent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: sigh. Windows. 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
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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 uint32_t NativeViewGLSurfaceGLX::DispatchEvent(const ui::PlatformEvent& event) {
488 XEvent forwarded_event = *event; 488 XEvent forwarded_event = *event;
489 forwarded_event.xexpose.window = parent_window_; 489 forwarded_event.xexpose.window = parent_window_;
490 XSendEvent(g_display, parent_window_, False, ExposureMask, 490 XSendEvent(g_display, parent_window_, False, ExposureMask,
491 &forwarded_event); 491 &forwarded_event);
492 XFlush(g_display); 492 XFlush(g_display);
493 return ui::POST_DISPATCH_STOP_PROPAGATION; 493 return ui::kPostDispatchStopPropagation;
494 } 494 }
495 495
496 bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size) { 496 bool NativeViewGLSurfaceGLX::Resize(const gfx::Size& size) {
497 size_ = size; 497 size_ = size;
498 glXWaitGL(); 498 glXWaitGL();
499 XResizeWindow(g_display, window_, size.width(), size.height()); 499 XResizeWindow(g_display, window_, size.width(), size.height());
500 glXWaitX(); 500 glXWaitX();
501 return true; 501 return true;
502 } 502 }
503 503
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 689
690 void* PbufferGLSurfaceGLX::GetConfig() { 690 void* PbufferGLSurfaceGLX::GetConfig() {
691 return config_; 691 return config_;
692 } 692 }
693 693
694 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { 694 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() {
695 Destroy(); 695 Destroy();
696 } 696 }
697 697
698 } // namespace gfx 698 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698