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

Side by Side Diff: ui/events/devices/x11/touch_factory_x11.cc

Issue 749063003: Fix grabbing capture when the mouse is pressed on Desktop Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/devices/x11/touch_factory_x11.h" 5 #include "ui/events/devices/x11/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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 memset(mask, 0, sizeof(mask)); 194 memset(mask, 0, sizeof(mask));
195 195
196 XISetMask(mask, XI_TouchBegin); 196 XISetMask(mask, XI_TouchBegin);
197 XISetMask(mask, XI_TouchUpdate); 197 XISetMask(mask, XI_TouchUpdate);
198 XISetMask(mask, XI_TouchEnd); 198 XISetMask(mask, XI_TouchEnd);
199 199
200 XISetMask(mask, XI_ButtonPress); 200 XISetMask(mask, XI_ButtonPress);
201 XISetMask(mask, XI_ButtonRelease); 201 XISetMask(mask, XI_ButtonRelease);
202 XISetMask(mask, XI_Motion); 202 XISetMask(mask, XI_Motion);
203 #if defined(OS_CHROMEOS) 203 #if defined(OS_CHROMEOS)
204 // XGrabKey() must be replaced with XI2 keyboard grab if XI2 key events are
205 // enabled on desktop Linux.
204 if (base::SysInfo::IsRunningOnChromeOS()) { 206 if (base::SysInfo::IsRunningOnChromeOS()) {
205 XISetMask(mask, XI_KeyPress); 207 XISetMask(mask, XI_KeyPress);
206 XISetMask(mask, XI_KeyRelease); 208 XISetMask(mask, XI_KeyRelease);
207 } 209 }
208 #endif 210 #endif
209 211
210 XIEventMask evmask; 212 XIEventMask evmask;
211 evmask.deviceid = XIAllDevices; 213 evmask.deviceid = XIAllDevices;
212 evmask.mask_len = sizeof(mask); 214 evmask.mask_len = sizeof(mask);
213 evmask.mask = mask; 215 evmask.mask = mask;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 if (ptr[0] || ptr[1]) 331 if (ptr[0] || ptr[1])
330 touchscreen_ids_.insert(std::make_pair(ptr[0], ptr[1])); 332 touchscreen_ids_.insert(std::make_pair(ptr[0], ptr[1]));
331 } 333 }
332 XFree(prop_return); 334 XFree(prop_return);
333 } 335 }
334 336
335 XCloseDevice(display, device); 337 XCloseDevice(display, device);
336 } 338 }
337 339
338 } // namespace ui 340 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/devices/x11/device_data_manager_x11.cc ('k') | ui/views/widget/desktop_aura/x11_pointer_grab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698