Index: ui/views/widget/widget.cc |
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc |
index 73ecd43d6cdf48338c85451ec3c9d6b9a534cb39..2c1d0cf486c3550bb7993d3c6334f53ff8824224 100644 |
--- a/ui/views/widget/widget.cc |
+++ b/ui/views/widget/widget.cc |
@@ -1031,6 +1031,16 @@ void Widget::OnNativeWidgetActivationChanged(bool active) { |
FOR_EACH_OBSERVER(WidgetObserver, observers_, |
OnWidgetActivationChanged(this, active)); |
+ // We have to update the focused text input client when the active widget |
sky
2014/05/30 16:30:15
This just describes the code, document why this is
Yuki
2014/06/02 07:38:55
Done.
|
+ // changes. See crbug.com/377479 |
+ views::FocusManager* focus_manager = GetFocusManager(); |
+ if (focus_manager) { |
+ if (active) |
+ focus_manager->FocusTextInputClient(focus_manager->GetFocusedView()); |
+ else |
+ focus_manager->BlurTextInputClient(focus_manager->GetFocusedView()); |
+ } |
+ |
if (IsVisible() && non_client_view()) |
non_client_view()->frame_view()->SchedulePaint(); |
} |