C2/C3: restore rotation keybinds (REPLY/LS-cycle) + focus contract routing on the focused chat surface

This commit is contained in:
2026-06-16 14:09:28 +02:00
parent ea3f00f107
commit fa20b53455
5 changed files with 213 additions and 30 deletions
+13 -1
View File
@@ -16,7 +16,7 @@ namespace HellionChat.Ui.Windows;
// Components are fully qualified through the Ui.Components prefix so the
// old Ui.StatusBar type (still alive until the cleanup block removes it)
// cannot shadow the new layer through parent-namespace resolution.
internal sealed class MainWindow : Window
internal sealed class MainWindow : Window, IFocusableChatWindow
{
private const float DefaultWidth = 620f;
private const float DefaultHeight = 340f;
@@ -205,6 +205,18 @@ internal sealed class MainWindow : Window
_input.Activate = true;
}
// IFocusableChatWindow — the keybind tail resolves which surface owns the
// input focus before routing a channel-set/REPLY/prefill at it (C3).
public bool HasFocusedInput => _input.IsFocused;
// Arm-and-hold: field writes only, safe from the framework thread; the draw
// path applies the actual ImGui focus next frame (same path as ActivateChat).
public void RequestInputFocus()
{
BringToFront();
_input.Activate = true;
}
// new-shadow on Window.Toggle so the open path also writes Config. A user-hide
// counts as "not visible", so /hellion is a reliable one-press recovery even when
// the Enter keybind can't fire (DirectChat / a focused game text field).