Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/candidate_window.cc |
| diff --git a/chrome/browser/chromeos/input_method/candidate_window.cc b/chrome/browser/chromeos/input_method/candidate_window.cc |
| index 030dc0c6b3b84017e383fce067fa65847159c8c7..429b79a6f450461b4debd338604847799506b0f9 100644 |
| --- a/chrome/browser/chromeos/input_method/candidate_window.cc |
| +++ b/chrome/browser/chromeos/input_method/candidate_window.cc |
| @@ -776,6 +776,7 @@ CandidateWindowView::CandidateWindowView(views::Widget* parent_frame) |
| previous_candidate_column_size_(0, 0), |
| previous_annotation_column_size_(0, 0), |
| is_suggestion_window_location_available_(false), |
| + should_show_upper_side_(false), |
| was_candidate_window_open_(false) { |
| } |
| @@ -889,6 +890,8 @@ void CandidateWindowView::UpdatePreeditText(const std::string& utf8_text) { |
| } |
| void CandidateWindowView::ShowLookupTable() { |
| + if (!candidate_area_->IsShown()) |
| + should_show_upper_side_ = false; |
| candidate_area_->Show(); |
| UpdateParentArea(); |
| } |
| @@ -1243,8 +1246,12 @@ void CandidateWindowView::ResizeAndMoveParentFrame() { |
| // Handle overflow at the bottom. |
| const int bottom_overflow = frame_bounds.bottom() - screen_bounds.bottom(); |
| - if (bottom_overflow > 0) { |
| + |
| + // To avoid flickering window position, the candidate window should be shown |
| + // on upper side of composition string if it was shown there. |
| + if (should_show_upper_side_ || bottom_overflow > 0) { |
| frame_bounds.set_y(frame_bounds.y() - height - frame_bounds.height()); |
| + should_show_upper_side_ = true; |
| } |
|
Yusuke Sato
2012/06/08 07:42:26
I think you should do
if (should_show_upper_side
Seigo Nonaka
2012/06/08 07:51:00
Done.
|
| // Move the window per the cursor location. |