abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2
diff options
context:
space:
mode:
authorJules Aguillon2026-04-10 19:03:51 +0200
committerGitHub2026-04-10 19:03:51 +0200
commitafa7c0187a3027e5ec826f4b19449c97e4419618 (patch)
tree0a7befb44921a1371852bf9b483c3236eb03b1dc /srcs/juloo.keyboard2
parent7bd9306a9f787d3222691f46d03e38f86ec87c9c (diff)
downloadunexpected-keyboard-afa7c0187a3027e5ec826f4b19449c97e4419618.tar.gz
unexpected-keyboard-afa7c0187a3027e5ec826f4b19449c97e4419618.zip
Refresh suggestions immediately after language switch (#1229)
* Switch dictionary when language changes The dictionary was otherwise updated by closing and opening the keyboard again. * Refresh suggestions immediately after language switch
Diffstat (limited to 'srcs/juloo.keyboard2')
-rw-r--r--srcs/juloo.keyboard2/KeyEventHandler.java6
-rw-r--r--srcs/juloo.keyboard2/Keyboard2.java2
2 files changed, 8 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/KeyEventHandler.java b/srcs/juloo.keyboard2/KeyEventHandler.java
index 1418ebb..a35e8e4 100644
--- a/srcs/juloo.keyboard2/KeyEventHandler.java
+++ b/srcs/juloo.keyboard2/KeyEventHandler.java
@@ -146,6 +146,12 @@ public final class KeyEventHandler
_suggestions.currently_typed_word(word);
}
+ public void ime_subtype_changed()
+ {
+ // Refresh the suggestions immediately after dictionary changed.
+ _suggestions.currently_typed_word(_typedword.get());
+ }
+
/** Update [_mods] to be consistent with the [mods], sending key events if
needed. */
void update_meta_state(Pointers.Modifiers mods)
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java
index af536dd..d0d6047 100644
--- a/srcs/juloo.keyboard2/Keyboard2.java
+++ b/srcs/juloo.keyboard2/Keyboard2.java
@@ -317,8 +317,10 @@ public class Keyboard2 extends InputMethodService
public void onCurrentInputMethodSubtypeChanged(InputMethodSubtype subtype)
{
refreshSubtypeImm();
+ refresh_current_dictionary();
refresh_candidates_view();
_keyboard_layout_view.setKeyboard(current_layout());
+ _keyeventhandler.ime_subtype_changed();
}
@Override