OLD | NEW |
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/aura/remote_window_tree_host_win.h" | 5 #include "ui/aura/remote_window_tree_host_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 } | 370 } |
371 | 371 |
372 void RemoteWindowTreeHostWin::OnChar(uint32 key_code, | 372 void RemoteWindowTreeHostWin::OnChar(uint32 key_code, |
373 uint32 repeat_count, | 373 uint32 repeat_count, |
374 uint32 scan_code, | 374 uint32 scan_code, |
375 uint32 flags) { | 375 uint32 flags) { |
376 DispatchKeyboardMessage(ui::ET_KEY_PRESSED, key_code, repeat_count, | 376 DispatchKeyboardMessage(ui::ET_KEY_PRESSED, key_code, repeat_count, |
377 scan_code, flags, true); | 377 scan_code, flags, true); |
378 } | 378 } |
379 | 379 |
380 void RemoteWindowTreeHostWin::OnWindowActivated() { | 380 void RemoteWindowTreeHostWin::OnWindowActivated(bool repaint) { |
381 OnHostActivated(); | 381 OnHostActivated(); |
| 382 if (repaint && compositor()) |
| 383 compositor()->ScheduleFullRedraw(); |
382 } | 384 } |
383 | 385 |
384 void RemoteWindowTreeHostWin::OnEdgeGesture() { | 386 void RemoteWindowTreeHostWin::OnEdgeGesture() { |
385 ui::GestureEvent event( | 387 ui::GestureEvent event( |
386 0, | 388 0, |
387 0, | 389 0, |
388 0, | 390 0, |
389 ui::EventTimeForNow(), | 391 ui::EventTimeForNow(), |
390 ui::GestureEventDetails(ui::ET_GESTURE_WIN8_EDGE_SWIPE, 0, 0)); | 392 ui::GestureEventDetails(ui::ET_GESTURE_WIN8_EDGE_SWIPE, 0, 0)); |
391 SendEventToProcessor(&event); | 393 SendEventToProcessor(&event); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 } | 515 } |
514 | 516 |
515 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { | 517 void RemoteWindowTreeHostWin::SetEventFlags(uint32 flags) { |
516 if (flags == event_flags_) | 518 if (flags == event_flags_) |
517 return; | 519 return; |
518 event_flags_ = flags; | 520 event_flags_ = flags; |
519 SetVirtualKeyStates(event_flags_); | 521 SetVirtualKeyStates(event_flags_); |
520 } | 522 } |
521 | 523 |
522 } // namespace aura | 524 } // namespace aura |
OLD | NEW |