ui/gtk3: Do not move Emojier popup with the active candidate in Xorg

Probably I think it's not useful to change the popup position frequently.
The popup size is always slightly changed with the emoji annotation length.
This commit is contained in:
fujiwarat 2018-08-30 12:58:57 +09:00
Родитель e6badb494e
Коммит 809d880337
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -1944,7 +1944,15 @@ public class IBusEmojier : Gtk.ApplicationWindow {
x = 0; x = 0;
bool changed = false; bool changed = false;
if (window_right_bottom.y > monitor_bottom) { // Do not up side down frequently.
// The first pos does not show the lookup table yet but the
// preedit only and the second pos shows the lookup table.
if (m_lookup_table.get_cursor_pos() != 1) {
if (m_is_up_side_down)
y = m_cursor_location.y - allocation.height;
else
y = cursor_right_bottom.y;
} else if (window_right_bottom.y > monitor_bottom) {
y = m_cursor_location.y - allocation.height; y = m_cursor_location.y - allocation.height;
// Do not up side down in Wayland // Do not up side down in Wayland
if (m_input_context_path == "") { if (m_input_context_path == "") {