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

Side by Side Diff: ash/host/ash_window_tree_host_x11.cc

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix build issues. Created 3 years, 9 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
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | ash/wm/window_manager_unittest.cc » ('j') | 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 "ash/host/ash_window_tree_host_x11.h" 5 #include "ash/host/ash_window_tree_host_x11.h"
6 6
7 #include <X11/extensions/Xfixes.h> 7 #include <X11/extensions/Xfixes.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xatom.h> 9 #include <X11/Xatom.h>
10 #include <X11/Xlib.h> 10 #include <X11/Xlib.h>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 return true; 203 return true;
204 } 204 }
205 default: 205 default:
206 return true; 206 return true;
207 } 207 }
208 } 208 }
209 209
210 void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent( 210 void AshWindowTreeHostX11::TranslateAndDispatchLocatedEvent(
211 ui::LocatedEvent* event) { 211 ui::LocatedEvent* event) {
212 TranslateLocatedEvent(event); 212 TranslateLocatedEvent(event);
213 SendEventToProcessor(event); 213 SendEventToSink(event);
214 } 214 }
215 215
216 ui::EventDispatchDetails AshWindowTreeHostX11::DispatchKeyEventPostIME( 216 ui::EventDispatchDetails AshWindowTreeHostX11::DispatchKeyEventPostIME(
217 ui::KeyEvent* event) { 217 ui::KeyEvent* event) {
218 input_method_handler()->SetPostIME(true); 218 input_method_handler()->SetPostIME(true);
219 ui::EventDispatchDetails details = 219 ui::EventDispatchDetails details = event_sink()->OnEventFromSource(event);
220 event_processor()->OnEventFromSource(event);
221 if (!details.dispatcher_destroyed) 220 if (!details.dispatcher_destroyed)
222 input_method_handler()->SetPostIME(false); 221 input_method_handler()->SetPostIME(false);
223 return details; 222 return details;
224 } 223 }
225 224
226 void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) { 225 void AshWindowTreeHostX11::SetCrOSTapPaused(bool state) {
227 if (!ui::IsXInput2Available()) 226 if (!ui::IsXInput2Available())
228 return; 227 return;
229 // Temporarily pause tap-to-click when the cursor is hidden. 228 // Temporarily pause tap-to-click when the cursor is hidden.
230 Atom prop = atom_cache()->GetAtom("Tap Paused"); 229 Atom prop = atom_cache()->GetAtom("Tap Paused");
(...skipping 14 matching lines...) Expand all
245 if (result != Success) 244 if (result != Success)
246 continue; 245 continue;
247 XFree(data); 246 XFree(data);
248 XIChangeProperty(xdisplay(), dev_list[i].deviceid, prop, XA_INTEGER, 8, 247 XIChangeProperty(xdisplay(), dev_list[i].deviceid, prop, XA_INTEGER, 8,
249 PropModeReplace, &value, 1); 248 PropModeReplace, &value, 1);
250 } 249 }
251 } 250 }
252 } 251 }
253 252
254 } // namespace ash 253 } // namespace ash
OLDNEW
« no previous file with comments | « ash/host/ash_window_tree_host_unified.cc ('k') | ash/wm/window_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698