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

Side by Side Diff: base/message_pump_glib_x.cc

Issue 7031057: X message pump: Remove the GDK window event filter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary comment Created 9 years, 7 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 | 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_glib_x.h" 5 #include "base/message_pump_glib_x.h"
6 6
7 #include <gdk/gdkx.h> 7 #include <gdk/gdkx.h>
8 #if defined(HAVE_XINPUT2) 8 #if defined(HAVE_XINPUT2)
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #else 10 #else
(...skipping 25 matching lines...) Expand all
36 gdk_window_add_filter(NULL, &GdkEventFilter, this); 36 gdk_window_add_filter(NULL, &GdkEventFilter, this);
37 gdk_event_handler_set(&EventDispatcherX, this, NULL); 37 gdk_event_handler_set(&EventDispatcherX, this, NULL);
38 38
39 #if defined(HAVE_XINPUT2) 39 #if defined(HAVE_XINPUT2)
40 InitializeXInput2(); 40 InitializeXInput2();
41 #endif 41 #endif
42 InitializeEventsToCapture(); 42 InitializeEventsToCapture();
43 } 43 }
44 44
45 MessagePumpGlibX::~MessagePumpGlibX() { 45 MessagePumpGlibX::~MessagePumpGlibX() {
46 gdk_window_remove_filter(NULL, &GdkEventFilter, this);
47
48 // It is not necessary to reset the GDK event handler using
49 // gdk_event_handler_set since it's done in the destructor for
50 // MessagePumpForUI.
46 } 51 }
47 52
48 bool MessagePumpGlibX::ShouldCaptureXEvent(XEvent* xev) { 53 bool MessagePumpGlibX::ShouldCaptureXEvent(XEvent* xev) {
49 return capture_x_events_[xev->type] 54 return capture_x_events_[xev->type]
50 #if defined(HAVE_XINPUT2) 55 #if defined(HAVE_XINPUT2)
51 && (xev->type != GenericEvent || xev->xcookie.extension == xiopcode_) 56 && (xev->type != GenericEvent || xev->xcookie.extension == xiopcode_)
52 #endif 57 #endif
53 ; 58 ;
54 } 59 }
55 60
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return; 225 return;
221 } 226 }
222 } 227 }
223 #endif // HAVE_XINPUT2 228 #endif // HAVE_XINPUT2
224 229
225 bool MessagePumpXObserver::WillProcessXEvent(XEvent* xev) { 230 bool MessagePumpXObserver::WillProcessXEvent(XEvent* xev) {
226 return false; 231 return false;
227 } 232 }
228 233
229 } // namespace base 234 } // 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