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

Unified Diff: chrome/browser/chromeos/input_method/candidate_window.cc

Issue 10542051: Reduce candidate window flickering. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/chromeos/input_method/candidate_window_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..95f18e35e027dd70a288f45cec8da8951ef2f504 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),
+ did_window_avoid_display_edge_(false),
Hiro Komatsu 2012/06/08 05:22:42 How about keep_position_ or should_keep_position_?
Seigo Nonaka 2012/06/08 05:42:14 position doesn't mean bit clear. changed to |shoul
was_candidate_window_open_(false) {
}
@@ -889,6 +890,8 @@ void CandidateWindowView::UpdatePreeditText(const std::string& utf8_text) {
}
void CandidateWindowView::ShowLookupTable() {
+ if (!candidate_area_->IsShown())
+ did_window_avoid_display_edge_ = 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 flicking window position, the candidate window should be shown on
+ // upper side of composition string if it was shown there.
+ if (did_window_avoid_display_edge_ || bottom_overflow > 0) {
frame_bounds.set_y(frame_bounds.y() - height - frame_bounds.height());
+ did_window_avoid_display_edge_ = true;
}
// Move the window per the cursor location.
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/candidate_window_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698