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

Unified Diff: ui/events/x/events_x.cc

Issue 706763003: x11: Always require XI2.2 for X11. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 6 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 | « ui/events/platform/x11/x11_hotplug_event_handler.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x.cc
diff --git a/ui/events/x/events_x.cc b/ui/events/x/events_x.cc
index a491884886f93d95d936d37506a0a71353141009..8c1b1808040f24d228fa5d2b7dc9a06234112ab1 100644
--- a/ui/events/x/events_x.cc
+++ b/ui/events/x/events_x.cc
@@ -109,7 +109,6 @@ class XModifierStateWatcher{
DISALLOW_COPY_AND_ASSIGN(XModifierStateWatcher);
};
-#if defined(USE_XI2_MT)
// Detects if a touch event is a driver-generated 'special event'.
// A 'special event' is a touch event with maximum radius and pressure at
// location (0, 0).
@@ -139,7 +138,6 @@ bool TouchEventIsGeneratedHack(const base::NativeEvent& native_event) {
return radius * 2 == max;
}
-#endif
int GetEventFlagsFromXState(unsigned int state) {
int flags = 0;
@@ -246,7 +244,6 @@ int GetButtonMaskForX2Event(XIDeviceEvent* xievent) {
ui::EventType GetTouchEventType(const base::NativeEvent& native_event) {
XIDeviceEvent* event =
static_cast<XIDeviceEvent*>(native_event->xcookie.data);
-#if defined(USE_XI2_MT)
switch(event->evtype) {
case XI_TouchBegin:
return TouchEventIsGeneratedHack(native_event) ? ui::ET_UNKNOWN :
@@ -258,7 +255,6 @@ ui::EventType GetTouchEventType(const base::NativeEvent& native_event) {
return TouchEventIsGeneratedHack(native_event) ? ui::ET_TOUCH_CANCELLED :
ui::ET_TOUCH_RELEASED;
}
-#endif // defined(USE_XI2_MT)
DCHECK(ui::TouchFactory::GetInstance()->IsTouchDevice(event->sourceid));
switch (event->evtype) {
@@ -487,7 +483,6 @@ int EventFlagsFromNative(const base::NativeEvent& native_event) {
static_cast<XIDeviceEvent*>(native_event->xcookie.data);
switch (xievent->evtype) {
-#if defined(USE_XI2_MT)
case XI_TouchBegin:
case XI_TouchUpdate:
case XI_TouchEnd:
@@ -496,7 +491,6 @@ int EventFlagsFromNative(const base::NativeEvent& native_event) {
GetEventFlagsFromXState(
XModifierStateWatcher::GetInstance()->state());
break;
-#endif
case XI_ButtonPress:
case XI_ButtonRelease: {
const bool touch =
« no previous file with comments | « ui/events/platform/x11/x11_hotplug_event_handler.cc ('k') | ui/events/x/events_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698