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

Side by Side Diff: ui/events/x/touch_factory_x11.cc

Issue 445413002: Revert of Listen for key events in SetupXI2ForXWindow() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/x/touch_factory_x11.h" 5 #include "ui/events/x/touch_factory_x11.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/XInput.h> 9 #include <X11/extensions/XInput.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 memset(mask, 0, sizeof(mask)); 203 memset(mask, 0, sizeof(mask));
204 204
205 #if defined(USE_XI2_MT) 205 #if defined(USE_XI2_MT)
206 XISetMask(mask, XI_TouchBegin); 206 XISetMask(mask, XI_TouchBegin);
207 XISetMask(mask, XI_TouchUpdate); 207 XISetMask(mask, XI_TouchUpdate);
208 XISetMask(mask, XI_TouchEnd); 208 XISetMask(mask, XI_TouchEnd);
209 #endif 209 #endif
210 XISetMask(mask, XI_ButtonPress); 210 XISetMask(mask, XI_ButtonPress);
211 XISetMask(mask, XI_ButtonRelease); 211 XISetMask(mask, XI_ButtonRelease);
212 XISetMask(mask, XI_Motion); 212 XISetMask(mask, XI_Motion);
213 XISetMask(mask, XI_KeyPress);
214 XISetMask(mask, XI_KeyRelease);
215 213
216 XIEventMask evmask; 214 XIEventMask evmask;
217 evmask.deviceid = XIAllDevices; 215 evmask.deviceid = XIAllDevices;
218 evmask.mask_len = sizeof(mask); 216 evmask.mask_len = sizeof(mask);
219 evmask.mask = mask; 217 evmask.mask = mask;
220 XISelectEvents(display, window, &evmask, 1); 218 XISelectEvents(display, window, &evmask, 1);
221 XFlush(display); 219 XFlush(display);
222 } 220 }
223 221
224 void TouchFactory::SetTouchDeviceList( 222 void TouchFactory::SetTouchDeviceList(
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (ptr[0] || ptr[1]) 340 if (ptr[0] || ptr[1])
343 touchscreen_ids_.insert(std::make_pair(ptr[0], ptr[1])); 341 touchscreen_ids_.insert(std::make_pair(ptr[0], ptr[1]));
344 } 342 }
345 XFree(prop_return); 343 XFree(prop_return);
346 } 344 }
347 345
348 XCloseDevice(display, device); 346 XCloseDevice(display, device);
349 } 347 }
350 348
351 } // namespace ui 349 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698