Skip to content

windows.ui.core.textinput: Return success from CoreInputView Try* methods - #345

Closed
IceSqueez wants to merge 2 commits into
ValveSoftware:bleeding-edgefrom
IceSqueez:patches/00001-fix-try-hide
Closed

windows.ui.core.textinput: Return success from CoreInputView Try* methods#345
IceSqueez wants to merge 2 commits into
ValveSoftware:bleeding-edgefrom
IceSqueez:patches/00001-fix-try-hide

Conversation

@IceSqueez

@IceSqueez IceSqueez commented Aug 3, 2026

Copy link
Copy Markdown

Problem

Unity 6 titles (e.g. Albion Online, appid 761890) crash the moment a text field is committed (pressing Enter in chat, market search, etc.). The engine calls CoreInputView.GetForCurrentView().TryHide(); the stubs in windows.ui.core.textinput return E_NOTIMPL, which the C++/WinRT projection turns into an unhandled hresult_not_implemented exception:

fixme:coreinputview:core_input_view3_TryHide iface ..., result ... stub!
fixme:combase:RoOriginateLanguageException 0x80004001
trace:seh:dispatch_exception code=e06d7363 (EXCEPTION_WINE_CXX_EXCEPTION)
wine: Unhandled exception 0xe06d7363 ...

Disabling the DLL does not help either the activation failure takes the same unhandled-exception path. On Windows this API always exists and succeeds, so games have no reason to handle failure.

Fix

  1. Return success from the TryShow*/TryHide* methods: TryShow* reports FALSE (no pane was shown), TryHide* reports TRUE (nothing is shown, so it is hidden) same convention as inputpane2_TryShow in windows.ui.
  2. Forward the calls to the tabtip window (WM_TABTIP_OSK_TOGGLE), mirroring the existing InputPane implementation, so the Steam on-screen keyboard follows text-field focus in CoreInputView-based titles. TryShowWithKind only toggles the keyboard for the Default and Keyboard kinds.

Testing

Tested with Albion Online on Arch/Hyprland: without the patch the client crashes on every text-field commit; with it chat and market search work.
The OSK toggling follows the same mechanism as the existing InputPane implementation.

…hods.

The stubs returned E_NOTIMPL, which the C++/WinRT projection turns into
an unhandled hresult_not_implemented exception. Unity 6 titles (e.g.
Albion Online) call CoreInputView.GetForCurrentView().TryHide() whenever
a text field is committed and crash on the exception.

Report success instead: TryShow* returns FALSE (no input pane can be
shown), TryHide* returns TRUE (nothing is shown, so it is hidden).
@IceSqueez
IceSqueez changed the base branch from experimental_11.0 to bleeding-edge August 3, 2026 20:49
…ry* methods.

Mirror the InputPane implementation in windows.ui: locate the tabtip
window and post WM_TABTIP_OSK_TOGGLE from TryShow*/TryHide*, so the
Steam on-screen keyboard follows text field focus in titles using
CoreInputView (Unity 6). TryShowWithKind only toggles the keyboard for
the Default and Keyboard kinds; the other panes do not exist.

Reported results are unchanged: TryShow* returns FALSE, TryHide*
returns TRUE.
@kisak-valve

Copy link
Copy Markdown
Member

Hello @IceSqueez, you've come across a downstream fork of wine used in Proton. This merge request should be evaluated and merged upstream first. After that's happened, then add a comment here with the commit and a Proton dev can ponder a backport.

@kisak-valve kisak-valve closed this Aug 3, 2026
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