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

Side by Side Diff: ui/events/platform/x11/x11_event_source_glib.cc

Issue 2199063003: Linux: Add xcb FD to glib event loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Created 4 years, 4 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/base/x/x11_window_cache_unittest.cc ('k') | ui/gfx/x/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/events/platform/x11/x11_event_source_glib.h" 5 #include "ui/events/platform/x11/x11_event_source_glib.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <glib.h> 8 #include <glib.h>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 g_source_add_poll(x_source_, x_poll_.get()); 91 g_source_add_poll(x_source_, x_poll_.get());
92 g_source_set_can_recurse(x_source_, TRUE); 92 g_source_set_can_recurse(x_source_, TRUE);
93 g_source_set_callback(x_source_, NULL, &event_source_, NULL); 93 g_source_set_callback(x_source_, NULL, &event_source_, NULL);
94 g_source_attach(x_source_, g_main_context_default()); 94 g_source_attach(x_source_, g_main_context_default());
95 } 95 }
96 96
97 // static 97 // static
98 std::unique_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() { 98 std::unique_ptr<PlatformEventSource> PlatformEventSource::CreateDefault() {
99 return base::WrapUnique(new X11EventSourceGlib(gfx::GetXDisplay())); 99 return base::WrapUnique(new X11EventSourceGlib(gfx::GetXDisplay()));
100 } 100 }
101
102 } // namespace ui 101 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/x/x11_window_cache_unittest.cc ('k') | ui/gfx/x/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698