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

Unified Diff: ui/aura/root_window_host_x11.cc

Issue 52823002: x11: Move XInput2 availability information out of the message pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/message_loop/message_pump_x11.cc ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window_host_x11.cc
diff --git a/ui/aura/root_window_host_x11.cc b/ui/aura/root_window_host_x11.cc
index 65dde3bae668b37dc2ac70eab008783da8e4927f..4e7e774dfc1b8c2cacb88b4bfc8202fc0eea90c7 100644
--- a/ui/aura/root_window_host_x11.cc
+++ b/ui/aura/root_window_host_x11.cc
@@ -97,7 +97,7 @@ void SelectEventsForRootWindow() {
StructureNotifyMask | attr.your_event_mask);
}
- if (!base::MessagePumpForUI::HasXInput2())
+ if (!ui::IsXInput2Available())
return;
unsigned char mask[XIMaskLen(XI_LASTEVENT)] = {};
@@ -398,7 +398,7 @@ RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds)
XSelectInput(xdisplay_, xwindow_, event_mask);
XFlush(xdisplay_);
- if (base::MessagePumpForUI::HasXInput2())
+ if (ui::IsXInput2Available())
ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_);
SelectEventsForRootWindow();
@@ -1057,6 +1057,8 @@ void RootWindowHostX11::UpdateIsInternalDisplay() {
void RootWindowHostX11::SetCrOSTapPaused(bool state) {
#if defined(OS_CHROMEOS)
+ if (!ui::IsXInput2Available())
+ return;
// Temporarily pause tap-to-click when the cursor is hidden.
Atom prop = atom_cache_.GetAtom("Tap Paused");
unsigned char value = state;
« no previous file with comments | « base/message_loop/message_pump_x11.cc ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698