Commit Graph
140 Commits
Author SHA1 Message Date
fanlusky 82048fb8be Add a setting to always use Chinese/English punctuation. 2026-09-02 20:53:04 +08:00
fanlusky 65b7516ea3 Replace the floating toolbar WebView2 with a D2D presenter
Draw the status bar with Direct2D and Segoe Fluent Icons, keep the existing
toggle and click behavior, and size the host so the compact mist shadow is
not clipped.
2026-09-02 19:12:16 +08:00
fanlusky ea9218ceff Replace the tray menu WebView2 with a D2D presenter
TrayMenuPresenter renders the language-bar right-click menu through
Direct2D on the existing menu HWND, matching the HTML version 1:1:
floating toolbar toggle, emoji/handwriting/keyboard/voice launchers,
settings, and about. The WebView2 menu path is kept as a fallback but
no longer created by default. Preedit caret reflow now uses an inline
object slot instead of letter-spacing, and cloud/AI candidate badges
are restored on D2D items.
2026-09-02 16:04:29 +08:00
fanlusky 5c02503139 Render the candidate window with D2D instead of WebView2
Drive the existing candidate HWND through CandidatePresenter and msimeui,
keep WebView2 for the menu, floating toolbar, and settings, and load
external skins from skin.toml color tokens. Restore cloud/AI badges on
D2D items, and keep click, pin, fix-position, and delete on the same
window messages as before.
2026-09-02 15:30:03 +08:00
fanlusky 30fc78f534 Improve candidate window stability, positioning, and pointer interaction 2026-09-01 00:45:19 +08:00
fanlusky 464406beac Fix the regression issue introduced after the previous fix for slow candidate window response during high CPU usage: candidate window flickering and candidates being highlighted without mouse hover movement. 2026-08-30 17:54:02 +08:00
fanlusky 2effb7c393 Add support for the DeepLX translation service. 2026-08-30 15:39:02 +08:00
fanlusky 7c5b7505ea Adjust some styles. 2026-08-29 21:48:50 +08:00
fanlusky 2ca14df0a5 Add support for a skin system. 2026-08-29 19:36:12 +08:00
fanlusky dafc7d6040 Optimize the logging on both the TSF and Server sides to facilitate issue diagnosis. 2026-08-25 13:53:30 +08:00
fanlusky f85d77e6a1 Add multilingual candidate translation. 2026-08-25 12:40:55 +08:00
fanlusky b159d8c9ab Update local path. Optimize audio interruption. 2026-08-23 23:37:00 +08:00
fanlusky 0e19f06da2 Fix the issue where the candidate window is truncated. 2026-08-23 18:58:35 +08:00
fanlusky 06e19fb14f Add some logs. 2026-08-23 18:10:47 +08:00
fanlusky 0049a18cdd Fix the issue where the language bar and FTB are out of sync for the Chinese-Japanese status. 2026-08-22 19:40:51 +08:00
fanlusky 2e44cc4e24 Add logs. 2026-08-22 18:34:13 +08:00
fanlusky e42cc92b8e Attempt to fix the flickering issue with Microsoft Shuangpin. Add an R mode for temporary Japanese input. 2026-08-22 16:54:29 +08:00
fanlusky bade05e5aa Provide an entry for setting the Tencent Cloud Translation API key. 2026-08-22 13:38:08 +08:00
fanlusky 1cf7846382 There should also be a corresponding status indicator when the keyboard Caps Lock is turned on. 2026-08-21 23:09:03 +08:00
fanlusky 6960a74fce Add dynamic switching of Japanese icons. 2026-08-21 17:33:37 +08:00
fanlusky 27b0974be1 Add preliminary support for Japanese input. 2026-08-21 16:55:41 +08:00
fanlusky e885856124 Add Chinese-English translation functionality during typing. 2026-08-21 16:04:50 +08:00
fanlusky 1ca62aa947 Add the Y mode feature, which provides temporary English input functionality. 2026-08-19 19:40:18 +08:00
fanlusky 20194244bb Add fine-grained control over the character count threshold for triggering Chinese-English mixed input. 2026-08-19 13:40:54 +08:00
fanlusky 943b6fbd4b Add J mode, the shorthand pinyin mode. 2026-08-19 08:05:44 +08:00
fanlusky fe649e706f Implement the clipboard functionality in the emoji panel. 2026-08-19 00:00:05 +08:00
fanlusky 8565b0531b Add kaomoji to mixed candidates (after emoji) behind general.kaomoji_mixed_input
kaomoji_ime: async worker mirroring emoji_ime; KaomojiQuery::QueryPrefix
gains a db_path override. NormalizeMixedCandidateOrder places kaomoji right
after emoji, shifting with cloud/AI. event_listener wires
UpdateKaomojiInput/ApplyKaomojiCandidates/EnqueueKaomojiCandidates and the
PrepareCandidateList trigger; config general.kaomoji_mixed_input is plumbed
through settings_app/webview2; main.cpp starts/stops KaomojiIme; ordering test
added.
2026-08-17 00:08:24 +08:00
fanlusky 7a35c8c20e Add M-mode (Shift+M) for quick kaomoji input
Shift+M enters a kaomoji quick-input mode backed by the kaomoji table in
others.db, supporting full pinyin, abbreviated pinyin, English words, and
shuangpin expansion. Candidates commit directly via the new
CandidateSource::Kaomoji; a [utility] kaomoji_mode toggle is wired through
settings. Hardens candidate payload rendering (HTML / backtick / comma
escaping) so kaomoji, which often contain < > &  and commas, display correctly.
2026-08-16 23:16:11 +08:00
fanlusky d15319bd66 Add emoji to mixed candidates (slot 3, shifts with cloud/AI) behind general.emoji_mixed_input. 2026-08-16 19:29:52 +08:00
fanlusky 08ee504609 Add E-mode (Shift+E) for quick emoji input
Shift+E enters an emoji quick-input mode backed by the emoji_pinyin index in
others.db, supporting full pinyin (xiaolian), abbreviated pinyin (xl), English
words (laugh), and shuangpin codes (Xiaohe xnlm expands to xiaolian).

- src/emoji/emoji_query.{h,cpp}: prefix lookup over emoji_pinyin with
  shuangpin->quanpin expansion driven by the active scheme
- event_listener: Shift+E trigger, composition helpers, candidate branch, and
  direct commit through the new CandidateSource::Emoji
- config: [utility] emoji_mode toggle wired through settings_app / webview2
- tests: emoji_query coverage for full/abbrev pinyin, English, Xiaohe shuangpin
- engine submodule: CandidateSource::Emoji (core/word_item.h)
2026-08-16 18:54:54 +08:00
fanlusky 4a3e67f048 Fix skin sync. 2026-08-16 16:23:21 +08:00
fanlusky eb1211e595 Add preedit font size settings. 2026-08-15 03:58:43 +08:00
fanlusky 0ce0ef5fc1 feat(ui): add a WeChat-inspired skin with light/dark variants and synchronized candidate and toolbar previews 2026-08-13 04:06:48 +08:00
fanlusky 8ec9ec9f17 Add the feature that repeated smart punctuation input switches to Chinese punctuation. 2026-08-10 03:23:50 +08:00
fanlusky a2aedbf39f Support paired punctuation. 2026-08-10 00:38:09 +08:00
fanlusky 67d9da572a Add the English input method status to the toolbar. 2026-08-09 19:05:39 +08:00
fanlusky ac8d47ef09 Change the candidate window to a stable transparent host window occupying about 1/4 of the screen (updating with the cursor monitor/DPI), with content wrapping according to the host width and scrolling according to the host height, and fix the issues of high-DPI edge cropping and inconsistency between measurement and CSS limits. 2026-08-08 21:37:09 +08:00
fanlusky 73fd24b53d Strengthen the adaptive sizing of the FTB when the resolution changes. 2026-08-08 19:49:19 +08:00
fanlusky 33a86c11b6 Add date-time quick input (T-mode) feature, strengthen installation to not overwrite user's config.toml, and add a cold-start protection for FTB that "displays within the page ready / up to 6s grace period, then shows/hides according to actual status" (still rebuilds webview2 on upgrade). 2026-08-08 12:37:24 +08:00
fanlusky 6a7b6c58d0 Fix the issue where the configuration for 9 candidates does not take effect. 2026-08-03 22:29:24 +08:00
fanlusky 223f8d70eb Implement smart punctuation, automatically using English punctuation , . : after English letters and numbers. 2026-08-01 19:54:57 +08:00
fanlusky 70d40bfa10 Fix: 仓耳今楷 now is supported in cand wnd and settings wnd preview. 2026-08-01 15:33:00 +08:00
fanlusky ef8cad988c Try to locate tray-menu not render issue once installed. 2026-08-01 14:52:08 +08:00
fanlusky f0b9932c3e Continue trying to stabilize the WebView2 loading process during server initialization. 2026-07-31 19:51:56 +08:00
fanlusky 8caf0eb399 fix(ftb): stop the floating toolbar from rendering blank
The toolbar occasionally stayed invisible while its host window looked
perfectly healthy: the HWND was shown at the right position and size, so
screenshot tools could still frame it, but WebView2 never painted into
it. Two independent causes, both specific to the toolbar.

The toolbar was the only small window left out of the cloaked warmup, so
whenever no client was active at startup its controller was created
against a hidden host and WebView2 never finished raster setup. The later
ShowWindow could not repair that.

The toolbar was also the only small window not renotified after
HWND_TOPMOST was applied. Pinning moves the host between z-bands, and in
a uiAccess process a WebView2 that is not told about it keeps compositing
against the old parent state. The toolbar reports navigation-ready last,
so the topmost gate normally opened inside its own navigation-completed
handler, before it had painted a single frame.

Changes:
- Warm up the toolbar host DWM-cloaked like the candidate and menu hosts,
  and express hide as a cloak until the first navigation completes so the
  warmup cannot be cut short. HideFloatingToolbarHost replaces the raw
  ShowWindow(SW_HIDE), including in the fullscreen hook.
- Give the toolbar the same post-topmost put_Bounds +
  NotifyParentWindowPositionChanged the menu host already had.
- Defer the first topmost application to a later message-loop turn via
  WM_APPLY_SMALL_WINDOW_TOPMOST, and route EnsureSmallWindowsTopmost
  through the same path so it can no longer pin inline.
- Add an opt-out diagnostic trace (ftb-diagnostic.log, disabled with
  MSIME_FTB_DIAG=0) recording every visibility decision together with the
  host and controller state, plus the foreground window behind a
  fullscreen hide.

Also drops the earlier attempt at deriving g_is_ime_active from the IPC
active client, which targeted a different failure mode than the one
actually reproduced.
2026-07-31 14:39:13 +08:00
fanlusky fb4a2d02c9 fix(candwnd): keep measure-time WebView bounds after host resize
Avoid shrinking the candidate WebView to the host client on first show
near a screen edge, which made the card wrap and get clipped.
2026-07-31 02:58:40 +08:00
fanlusky de5b764a72 fix(ftb): reconcile toolbar visibility from IPC active-client state
WM_IMEACTIVATE could be dropped or skipped when activation was unchanged,
leaving the floating toolbar hidden until the user switched IME away and
back. Derive g_is_ime_active from the live active client on every visibility
apply, and re-apply once the FTB WebView finishes its first navigation.
Also restore Watchdog startup with a short profile-ready retry window.
2026-07-31 00:43:55 +08:00
fanlusky 68f7557048 chore(traymenu): remove temporary traymenu-diag logging
Drop TrayMenuDiag / DescribeHostWindow and all call sites added while
debugging the uiAccess TOPMOST WebView2 init failure, now that the fix
is verified.
2026-07-30 03:16:28 +08:00
fanlusky c029fb7222 fix(webview2): prevent TOPMOST from blocking controller creation in uiAccess process
In a uiAccess=true process, a WS_EX_TOPMOST parent window causes
WebView2's internal cross-process SetParent to be rejected by UIPI,
returning E_INVALIDARG (0x80070057) from CreateCoreWebView2Controller.

This was triggered when the watchdog restarted the server while the IME
was already active: the floating toolbar showed early, which mistakenly
raised the DWM-cloaked (warmup) menu host to TOPMOST before its
controller existed. Manual launches never hit this because the IME was
inactive at startup time.

Changes:
- Gate RaiseTrayMenuAboveSmallWindows on menu controller existence so
  a cloaked warmup host is never prematurely pinned TOPMOST.
- Strip WS_EX_TOPMOST from any host window before requesting its
  controller; the lazy-topmost gate re-pins all three once ready.
- Serialize controller creation (one in-flight at a time) to avoid
  E_INVALIDARG from concurrent CreateCoreWebView2Controller calls on
  the same environment.
- Rotate past a persistently failing host so it cannot starve siblings.
- Harden LOCALAPPDATA resolution with SHGetKnownFolderPath fallback.
- Increase watchdog restart delay to 2s for user-data-folder lock drain.
- Add diagnostic logging (traymenu-diag.log) for WebView2 init states.
2026-07-30 03:08:42 +08:00
fanlusky 2edf16d01e feat: add word-to-character candidate selection
- add a disabled-by-default word-to-character setting
- commit the first or last Han character with [ and ]
- use the highlighted candidate for punctuation commits
- preserve punctuation behavior when no Han character is available
- add exact-text commit IPC support and related tests
2026-07-29 13:43:36 +08:00