| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/platform_window/x11/x11_window.h" | 5 #include "ui/platform_window/x11/x11_window.h" |
| 6 | 6 |
| 7 #include <X11/extensions/XInput2.h> | 7 #include <X11/extensions/XInput2.h> |
| 8 #include <X11/Xatom.h> | 8 #include <X11/Xatom.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 #include <X11/Xutil.h> | 10 #include <X11/Xutil.h> |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 StructureNotifyMask | PropertyChangeMask | | 93 StructureNotifyMask | PropertyChangeMask | |
| 94 PointerMotionMask; | 94 PointerMotionMask; |
| 95 XSelectInput(xdisplay_, xwindow_, event_mask); | 95 XSelectInput(xdisplay_, xwindow_, event_mask); |
| 96 | 96 |
| 97 unsigned char mask[XIMaskLen(XI_LASTEVENT)]; | 97 unsigned char mask[XIMaskLen(XI_LASTEVENT)]; |
| 98 memset(mask, 0, sizeof(mask)); | 98 memset(mask, 0, sizeof(mask)); |
| 99 | 99 |
| 100 XISetMask(mask, XI_TouchBegin); | 100 XISetMask(mask, XI_TouchBegin); |
| 101 XISetMask(mask, XI_TouchUpdate); | 101 XISetMask(mask, XI_TouchUpdate); |
| 102 XISetMask(mask, XI_TouchEnd); | 102 XISetMask(mask, XI_TouchEnd); |
| 103 XISetMask(mask, XI_ButtonPress); | |
| 104 XISetMask(mask, XI_ButtonRelease); | |
| 105 XISetMask(mask, XI_Motion); | |
| 106 | 103 |
| 107 XIEventMask evmask; | 104 XIEventMask evmask; |
| 108 evmask.deviceid = XIAllDevices; | 105 evmask.deviceid = XIAllDevices; |
| 109 evmask.mask_len = sizeof(mask); | 106 evmask.mask_len = sizeof(mask); |
| 110 evmask.mask = mask; | 107 evmask.mask = mask; |
| 111 XISelectEvents(xdisplay_, xwindow_, &evmask, 1); | 108 XISelectEvents(xdisplay_, xwindow_, &evmask, 1); |
| 112 XFlush(xdisplay_); | 109 XFlush(xdisplay_); |
| 113 | 110 |
| 114 ::Atom protocols[2]; | 111 ::Atom protocols[2]; |
| 115 protocols[0] = atom_cache_.GetAtom("WM_DELETE_WINDOW"); | 112 protocols[0] = atom_cache_.GetAtom("WM_DELETE_WINDOW"); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 &reply_event); | 290 &reply_event); |
| 294 XFlush(xdisplay_); | 291 XFlush(xdisplay_); |
| 295 } | 292 } |
| 296 break; | 293 break; |
| 297 } | 294 } |
| 298 } | 295 } |
| 299 return POST_DISPATCH_STOP_PROPAGATION; | 296 return POST_DISPATCH_STOP_PROPAGATION; |
| 300 } | 297 } |
| 301 | 298 |
| 302 } // namespace ui | 299 } // namespace ui |
| OLD | NEW |