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

Unified Diff: ui/views/widget/widget.cc

Issue 246073009: Refreshes the caret bounds on window move for IME UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix trybot failures Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 9d6f78e803262afc7939fb579e844915cca81be0..2bc65f079e388de2d550154a4f2912de0a7f4ee2 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -1090,6 +1090,11 @@ gfx::Size Widget::GetMaximumSize() {
void Widget::OnNativeWidgetMove() {
widget_delegate_->OnWidgetMove();
+ if (GetRootView()->GetFocusManager()) {
+ View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView();
+ if (focused_view && focused_view->GetInputMethod())
+ focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view);
+ }
FOR_EACH_OBSERVER(WidgetObserver, observers_, OnWidgetBoundsChanged(
this,
GetWindowBoundsInScreen()));
@@ -1098,6 +1103,12 @@ void Widget::OnNativeWidgetMove() {
void Widget::OnNativeWidgetSizeChanged(const gfx::Size& new_size) {
root_view_->SetSize(new_size);
+ if (GetRootView()->GetFocusManager()) {
+ View* focused_view = GetRootView()->GetFocusManager()->GetFocusedView();
+ if (focused_view && focused_view->GetInputMethod())
+ focused_view->GetInputMethod()->OnCaretBoundsChanged(focused_view);
+ }
+
// Size changed notifications can fire prior to full initialization
// i.e. during session restore. Avoid saving session state during these
// startup procedures.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698