| Index: ui/aura/root_window_host_linux.cc
|
| diff --git a/ui/aura/root_window_host_linux.cc b/ui/aura/root_window_host_linux.cc
|
| index f2d00323ddbc9519c443ac74fd7f8525ea1b0089..d02a41ab58007476146dedf6c2e9ab1e505e61f5 100644
|
| --- a/ui/aura/root_window_host_linux.cc
|
| +++ b/ui/aura/root_window_host_linux.cc
|
| @@ -93,7 +93,17 @@ void SelectEventsForRootWindow() {
|
| StructureNotifyMask | attr.your_event_mask);
|
| }
|
|
|
| - XIEventMask evmask;
|
| + if (!base::MessagePumpForUI::HasXInput2())
|
| + return;
|
| +
|
| + int num_masks = -1;
|
| + XIEventMask* current_mask = XIGetSelectedEvents(display, root_window,
|
| + &num_masks);
|
| + if (current_mask) {
|
| + XFree(current_mask);
|
| + return;
|
| + }
|
| +
|
| unsigned char mask[XIMaskLen(XI_LASTEVENT)] = {};
|
| memset(mask, 0, sizeof(mask));
|
|
|
| @@ -107,6 +117,8 @@ void SelectEventsForRootWindow() {
|
| XISetMask(mask, XI_TouchUpdate);
|
| XISetMask(mask, XI_TouchEnd);
|
| #endif
|
| +
|
| + XIEventMask evmask;
|
| evmask.deviceid = XIAllDevices;
|
| evmask.mask_len = sizeof(mask);
|
| evmask.mask = mask;
|
|
|