Files
voice-cat/clients/windows/VoiceCat.App/Program.cs
Talon 65736df464 fix(windows): polish hotkeys, user list, titlebar, and PM window
- Suppress the system ding on global hotkeys/PTT and the user-list Enter
  key by setting SuppressKeyPress (Handled alone leaves WM_CHAR to beep).
- Preserve the user-list keyboard selection across talking/mute refreshes
  instead of resetting it on every Items.Clear().
- Include the connected server name in the main window titlebar.
- Close the private-message window on Escape.
- Show the PM window without an owner so focus is no longer trapped to it
  and the main window can be worked in while a PM is open.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 12:30:48 +02:00

37 lines
1.5 KiB
C#

using VoiceCat.App.Forms;
namespace VoiceCat.App;
internal static class Program
{
[STAThread]
private static void Main()
{
// Diagnostic-logging-only for now (manual debugging session) — every exception that
// would otherwise be silently caught by WinForms' default message-loop handling (or
// crash with no visible cause) gets printed to stdout/stderr first.
Application.ThreadException += (_, e) =>
Console.Error.WriteLine($"[UNHANDLED ThreadException] {e.Exception}");
AppDomain.CurrentDomain.UnhandledException += (_, e) =>
Console.Error.WriteLine($"[UNHANDLED AppDomain exception] {e.ExceptionObject}");
Console.WriteLine("VoiceCat.App starting...");
ApplicationConfiguration.Initialize();
using var connectDialog = new ConnectDialog();
Console.WriteLine("Showing ConnectDialog...");
var result = connectDialog.ShowDialog();
Console.WriteLine($"ConnectDialog closed with DialogResult={result}, ConnectedClient={(connectDialog.ConnectedClient is null ? "null" : "set")}");
if (result != DialogResult.OK || connectDialog.ConnectedClient is null)
{
Console.WriteLine("Exiting (cancelled or no connected client).");
return;
}
Console.WriteLine("Launching MainForm...");
Application.Run(new MainForm(connectDialog.ConnectedClient, connectDialog.SelfUserId,
connectDialog.Nickname, connectDialog.ServerName));
Console.WriteLine("MainForm closed. Exiting.");
}
}