Skip to content

Retire Linux-era view shims#906

Open
johnml1135 wants to merge 3 commits into
mainfrom
retire-linux-era-view-shims
Open

Retire Linux-era view shims#906
johnml1135 wants to merge 3 commits into
mainfrom
retire-linux-era-view-shims

Conversation

@johnml1135
Copy link
Copy Markdown
Contributor

@johnml1135 johnml1135 commented May 21, 2026

Summary

  • remove the retired Linux-era managed Views shims ViewInputManager and ManagedVwWindow, including their solution and build wiring
  • keep the Windows-native RootSite path in place by using VwTextStore/IViewInputMgr and HWND client-rectangle geometry while removing stale IVwWindow/VwWindow interop exposure
  • update reg-free manifest inputs, architecture/OpenSpec docs, and task tracking for the shim retirement

Validation

  • ./build.ps1
  • ./test.ps1 -SkipManaged -TestProject TestViews
  • ./test.ps1 -TestProject FwBuildTasksTests -TestFilter "FullyQualifiedName~RegFreeCreator"
  • ./test.ps1 -TestProject SimpleRootSiteTests
  • CI: Whitespace check
  • Manual smoke in rebuilt FieldWorks app covering lexical edit view typing, keyboard switching, IME/composition, selection/PageUp/PageDown, and launch/manifest sanity

This change is Reviewable

Copilot AI review requested due to automatic review settings May 21, 2026 00:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR retires legacy Linux/Mono-era managed Views shims (ViewInputManager, ManagedVwWindow) and updates code/docs/build plumbing to rely solely on the Windows-native Views input and geometry paths.

Changes:

  • Removed managed shim projects/sources and related solution/build/reg-free manifest wiring.
  • Simplified native Views codepaths to always use Windows-native VwTextStore (input) and GetClientRect (geometry), eliminating COM activation branches.
  • Updated OpenSpec architecture docs/specs and change-tracking artifacts to reflect the shim retirement.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
openspec/specs/architecture/ui-framework/views-rendering.md Updates architecture diagram text to reflect Windows-native input/geometry and shim retirement.
openspec/specs/architecture/interop/native-boundary.md Updates interop boundary documentation to remove ManagedVwWindow as an active boundary.
openspec/specs/architecture/interop/com-contracts.md Notes retired shims in COM contracts documentation.
openspec/changes/retire-linux-era-view-shims/** Adds proposal/design/research/tasks and requirements specs for shim retirement and validation.
Src/views/VwRootBox.cpp Removes non-Windows COM activation branch for ViewInputManager.
Src/views/VwSelection.cpp Removes non-Windows IVwWindow wrapper path; always uses GetClientRect.
Src/views/VwTextStore.cpp Removes non-Windows conditional around ClientToScreen / TSF-related behavior.
Src/views/Views.idh Removes IVwWindow/VwWindow interface+coclass; adjusts IViewInputMgr comment.
Src/views/Views_GUIDs.cpp Removes GUID exports for IVwWindow/VwWindow.
Src/Common/SimpleRootSite/ViewInputManager.cs Deletes managed ViewInputManager shim.
Src/ManagedVwWindow/** Deletes managed ManagedVwWindow project and its tests.
Build/RegFree.targets Removes ManagedVwWindow.dll from managed COM manifest inputs.
Src/Common/FieldWorks/BuildInclude.targets Removes ManagedVwWindow.dll from FieldWorks manifest inputs.
Build/mkall.targets Removes excluded CLSIDs for the retired managed shims.
Build/Src/FwBuildTasks/CollectTargets.cs Removes special-case Unix-only condition for ManagedVwWindow project.
FieldWorks.sln Removes ManagedVwWindow projects from the solution.
.github/src-catalog.md Removes catalog entry for ManagedVwWindow.

Comment on lines +22 to +23
- Windows RootSite input uses native VwTextStore, and selection/page geometry uses the RootSite HWND with Win32 client-rectangle APIs.
- The retired Linux-era ManagedVwWindow shim is not part of the Windows rendering path.
Comment on lines +21 to +22
- Windows RootSite editing relies on native Views interfaces and VwTextStore for input management.
- The retired Linux-era ManagedVwWindow shim no longer provides a managed HWND wrapper boundary.
Comment thread Src/views/VwSelection.cpp
Comment on lines 619 to 623
Rect rcRootSite;
#if defined(WIN32) || defined(WIN64)
if(!GetClientRect(hwndRootSite, &rcRootSite)){
Assert(false); // we better have a valid HWND at this point! That's the only reason GetClientRect should fail that we could think of.
return;
}
Comment thread Src/views/VwTextStore.cpp
Comment on lines 1285 to 1289
CheckHr(qsel->Location(hg.m_qvg, hg.m_rcSrcRoot, hg.m_rcDstRoot, &rcSel,
&rcSecondary, &fSplit, &fEBAIgnored));
}
#if defined(WIN32) || defined(WIN64)
rcSel.ClientToScreen(hwnd);
#else
// TODO-Linux: Awaiting VwTextStore rewrite for Linux
#endif
*prc = rcSel;
@github-actions
Copy link
Copy Markdown

NUnit Tests

    1 files  ±0      1 suites  ±0   9m 25s ⏱️ - 1m 43s
4 203 tests  - 2  4 132 ✅  - 2  71 💤 ±0  0 ❌ ±0 
4 212 runs   - 2  4 141 ✅  - 2  71 💤 ±0  0 ❌ ±0 

Results for commit 32dbddd. ± Comparison against base commit b0bf8a8.

This pull request removes 2 tests.
SIL.FieldWorks.Language.ManagedVwWindowTests ‑ NotSettingWindowTest
SIL.FieldWorks.Language.ManagedVwWindowTests ‑ SimpleWindowTest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants