summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2015-06-12 11:43:56 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2015-06-12 11:43:56 +0900
commitbd7673e73c2a8c54d2a827603a960d76dab7be1b (patch)
tree13c2276e2386166173288f69b17c5a51bd9bf58e
parentb0f2536b58dff885fa887230909718a69b571053 (diff)
downloadibus-bd7673e73c2a8c54d2a827603a960d76dab7be1b.tar.gz
Do not put lookup window at the minus position
tweetdeck.twitter.com seems has hidden GdkWindow and does not provide the positive cursor position. BUG=https://github.com/ibus/ibus/issues/1801 Review URL: https://codereview.appspot.com/246010043
-rw-r--r--ui/gtk3/candidatepanel.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gtk3/candidatepanel.vala b/ui/gtk3/candidatepanel.vala
index 1b7bec7c..c3260446 100644
--- a/ui/gtk3/candidatepanel.vala
+++ b/ui/gtk3/candidatepanel.vala
@@ -301,11 +301,15 @@ public class CandidatePanel : Gtk.Box{
x = root_width - allocation.width;
else
x = cursor_right_bottom.x;
+ if (x < 0)
+ x = 0;
if (window_right_bottom.y > root_height)
y = m_cursor_location.y - allocation.height;
else
y = cursor_right_bottom.y;
+ if (y < 0)
+ y = 0;
move(x, y);
}