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

Side by Side Diff: ui/platform_window/x11/x11_window.cc

Issue 394323002: x11: Do not listen for XI2 mouse events for X11Window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698