Commit Graph
95 Commits
Author SHA1 Message Date
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
fanlusky 549aac8d00 Add toggles for Shift/Ctrl/Ctrl+Alt+Space CN-EN switch hotkeys.
Expose keybindings.switch_language_* in config and settings hosts; leave system Ctrl+Space alone.
2026-07-28 21:43:52 +08:00
fanlusky 6632e9ebcf Add default IME language and per-app/global CN-EN scope settings.
Wire config + settings UI for default_ime_mode / ime_mode_scope, and sync unified mode across apps when scope is global.
2026-07-28 20:26:25 +08:00
fanlusky 6987f336c3 fix(candidate-window): pass mouse input through transparent host area
Clip the stable oversized candidate host to the actual rendered content,
preserving the editor cursor and mouse behavior outside the candidate card.
Temporarily restore the full region when displaying the context menu.
2026-07-28 17:14:37 +08:00
fanlusky 8e6b68b672 feat: persist and apply floating toolbar component settings
- store optional toolbar component preferences in config.toml
- synchronize component settings with the settings application
- apply component visibility changes at runtime
- launch the screen keyboard from the floating toolbar
- resize the toolbar window based on visible components
2026-07-28 16:53:48 +08:00
fanlusky 380e465bb5 feat(theme): add per-surface themes for Direct2D input interfaces
- add independent theme settings for the emoji panel, on-screen keyboard,
  handwriting panel, and voice input overlay
- support follow-global, dark, and light modes
- add light color palettes for each Direct2D interface
- load the shared theme configuration when standalone panels start
- reload the voice overlay theme before it is displayed
- expose the new theme options through the settings backend
2026-07-28 16:14:14 +08:00
fanlusky 2dc4f63cd6 feat(settings): add configurable candidate appearance and page-size digit gating
Expose candidate font, size, text color, and page size settings through the config and WebView bridge. Limit selection digits to the configured page size and apply appearance updates to the live candidate window.
2026-07-28 15:19:46 +08:00
fanlusky 27885a6fa4 fix(candwnd): use stable 720 DIP host with internal card offset
Keep the transparent candidate HWND at wrap-cap width so right-edge
growth adjusts MarginLeft/Top instead of SetWindowPos-moving the host,
which was flashing through layered transparency. Measure/layout keep
horizontal candidates on one row and wrap only inside long items.
2026-07-28 04:06:16 +08:00
fanlusky 26ae578ae9 fix: keep candidate menus within screen bounds 2026-07-27 22:07:08 +08:00
fanlusky 1c023d21fa fix: expand candidate window for context menu overflow 2026-07-27 21:56:07 +08:00
fanlusky e8736d66b9 feat: integrate candidate ranking, pinning, and cache refresh 2026-07-27 20:25:27 +08:00
fanlusky 02d5a3ff37 fix(candwnd): measure and size candidate wrap at 600 DIP
Force wrap-aware measure, serialize FineTune after measure content
updates, and preserve flip-up host height via MarginTop.

feat: lazily load single-letter Pinyin candidates

- query the top 24 single-letter candidates from the database
- load the complete candidate list on the first page-down action
- apply the same behavior to Shuangpin and Quanpin
- resolve Shuangpin initials according to the active profile
- preserve candidate frequency adjustment and pinning
- disable deletion for single-letter candidates
- add regression tests for Shuangpin v-to-zh mapping and lazy expansion
2026-07-27 16:12:46 +08:00
fanlusky e2af2c49d2 chore(logging): remove server debug logging
- remove OutputDebugString calls across the server
- remove spdlog calls and file logger initialization
- disable IPC and WebView debug output
- remove temporary database performance instrumentation
- update the MetasequoiaImeEngine submodule revision
2026-07-27 15:13:51 +08:00
fanlusky 5a3b5d71c3 fix: keep tray menu above floating toolbar without flicker
Pin the menu last when it is visible, stop FTB layout from raising Z-order, and raise the menu while still cloaked so it does not flash under the toolbar.
2026-07-24 18:55:42 +08:00
fanlusky b01a73e336 fix: stop horizontal candidate wrap flash on long lists
Keep horizontal candidates on one line with max-content/nowrap, and resize the host/WebView before painting so content is never laid out in a still-narrow viewport.
2026-07-24 02:07:27 +08:00
fanlusky f72242f1ca feat: persist and apply appearance theme mode for settings and small windows
Wire theme_mode and per-surface overrides through config, resolve system
theme, and hot-reload cand/ftb/menu HTML plus settings chrome colors.
2026-07-23 23:49:02 +08:00
fanlusky 7f06a1a046 fix: sync tray floating-toolbar toggle from config
Refresh the menu toggle from general.floating_toolbar on show,
navigation, and config reload so it stays aligned with Settings.
Refs metasequoiaime/MetasequoiaImeTsf#17
2026-07-23 21:43:15 +08:00
fanlusky f70804d89f Defer small-window TopMost until WebViews are ready on first show.
Avoid uiAccess + HWND WebView2 init races that blanked the candidate UI,
and stop parking the floating toolbar off-screen until WebView starts.
2026-07-23 11:28:39 +08:00
fanlusky 8bbb73f27d Rename data folder to metasequoiaime 2026-07-21 23:12:17 +08:00
fanlusky ab494f44fb Move the TSF custom preedit style settings to the appearance section. 2026-07-21 14:49:36 +08:00
fanlusky 9e13309b70 The server-side candidate window supports custom preedit to be empty or pinyin segmentation. 2026-07-21 14:28:59 +08:00
fanlusky c92bff8734 Preliminarily support customizing preedit on the TSF side. 2026-07-21 13:00:15 +08:00
fanlusky 040975f125 Add a switch for K mode. 2026-07-21 02:24:43 +08:00
fanlusky cd23d78866 Add the U mode description to the settings panel, and add a switch. 2026-07-21 01:39:04 +08:00
fanlusky 7770b77031 Enable the simplified-traditional toggle on the floating toolbar. 2026-07-20 15:53:05 +08:00
fanlusky f0bd72669e Implement simplified-traditional input switching. 2026-07-20 15:36:12 +08:00
fanlusky cd29ca88d0 Improve the language bar right-click menu. 2026-07-20 02:07:39 +08:00
fanlusky 4765d72156 Integrate the handwriting recognition board into the server. 2026-07-20 01:57:31 +08:00
fanlusky 1d52e32738 Add a switch for cloud candidates to the input function area. 2026-07-18 16:32:35 +08:00
fanlusky ed3af76d79 Integrate voice input functionality into the server. 2026-07-18 15:24:15 +08:00
fanlusky 765e340251 Integrate the voice input method. 2026-07-18 00:42:24 +08:00
fanlusky d1d28418f7 Implement the on-screen keyboard function in the right-click menu. 2026-07-17 23:54:18 +08:00
fanlusky 6e235a8dfd Implement the emoji panel function in the right-click menu. 2026-07-17 23:50:28 +08:00
fanlusky fd0cff71e9 Fix the issue where the language bar right-click menu does not respond. 2026-07-17 23:38:14 +08:00
fanlusky 70865e30df Add support for the emoji panel. 2026-07-17 22:46:51 +08:00
fanlusky 7775b97c09 Fix the issue where the candidate window cannot be pulled up when switching back from Microsoft's emoji panel, and deeply optimize the stability of IPC connections. 2026-07-16 21:41:09 +08:00
fanlusky 94a5ed3658 Support switching auxiliary code schemes. 2026-07-15 13:26:14 +08:00
fanlusky 985ec87ea2 Add support for the Ziranma Shuangpin scheme. 2026-07-15 00:26:07 +08:00
fanlusky 69c657e44b Implement bidirectional synchronization for the Chinese-English mixed input feature. 2026-07-14 19:21:01 +08:00
fanlusky d4f2bcc91e Optimize the memory usage of WebView2. 2026-07-14 01:06:51 +08:00
fanlusky e4fe985896 Thoroughly solve the settings window flickering and focus instability issues. Separate it out as a standalone exe. 2026-07-14 00:09:06 +08:00
fanlusky d7c247747c Bidirectional synchronization of input method scheme settings. 2026-07-13 19:06:01 +08:00
fanlusky 6a3ddeb1b6 Bidirectional synchronization of the paging settings in the settings interface. Support comma, period, and slash for page turning, support PageUp and PageDown for page turning, support up and down arrow keys to move the highlighted candidate selection, and left and right arrow keys to move the caret. 2026-07-12 22:28:14 +08:00
fanlusky d2408a7ba7 Bidirectional synchronization of the paging settings in the settings interface. 2026-07-12 10:34:06 +08:00
fanlusky cd833e7faf Synchronize the frontend auxiliary code switch with the actual functionality. 2026-07-11 16:27:09 +08:00
fanlusky 75f688d446 Implement a switch to control whether to display auxiliary codes in the candidate window. 2026-07-11 11:48:21 +08:00