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

Side by Side Diff: base/message_pump_x.cc

Issue 8769049: Fix MessagePumpX::ProcessXEvent checking of WillProcessXEvent return value. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
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
« no previous file with comments | « no previous file | 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 "base/message_pump_x.h" 5 #include "base/message_pump_x.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool MessagePumpX::ProcessXEvent(MessagePumpDispatcher* dispatcher, 135 bool MessagePumpX::ProcessXEvent(MessagePumpDispatcher* dispatcher,
136 XEvent* xev) { 136 XEvent* xev) {
137 bool should_quit = false; 137 bool should_quit = false;
138 138
139 bool have_cookie = false; 139 bool have_cookie = false;
140 if (xev->type == GenericEvent && 140 if (xev->type == GenericEvent &&
141 XGetEventData(xev->xgeneric.display, &xev->xcookie)) { 141 XGetEventData(xev->xgeneric.display, &xev->xcookie)) {
142 have_cookie = true; 142 have_cookie = true;
143 } 143 }
144 144
145 if (WillProcessXEvent(xev) == EVENT_CONTINUE) { 145 if (!WillProcessXEvent(xev)) {
146 MessagePumpDispatcher::DispatchStatus status = 146 MessagePumpDispatcher::DispatchStatus status =
147 dispatcher->Dispatch(xev); 147 dispatcher->Dispatch(xev);
148 148
149 if (status == MessagePumpDispatcher::EVENT_QUIT) { 149 if (status == MessagePumpDispatcher::EVENT_QUIT) {
150 should_quit = true; 150 should_quit = true;
151 Quit(); 151 Quit();
152 } else if (status == MessagePumpDispatcher::EVENT_IGNORED) { 152 } else if (status == MessagePumpDispatcher::EVENT_IGNORED) {
153 DVLOG(1) << "Event (" << xev->type << ") not handled."; 153 DVLOG(1) << "Event (" << xev->type << ") not handled.";
154 } 154 }
155 DidProcessXEvent(xev); 155 DidProcessXEvent(xev);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return true; 192 return true;
193 } 193 }
194 return false; 194 return false;
195 } 195 }
196 196
197 void MessagePumpX::DidProcessXEvent(XEvent* xevent) { 197 void MessagePumpX::DidProcessXEvent(XEvent* xevent) {
198 FOR_EACH_OBSERVER(MessagePumpObserver, observers(), DidProcessEvent(xevent)); 198 FOR_EACH_OBSERVER(MessagePumpObserver, observers(), DidProcessEvent(xevent));
199 } 199 }
200 200
201 } // namespace base 201 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698