focus the close button before first launch and on every show to make title text consistently not selected

This commit is contained in:
mshafer1
2025-01-11 08:57:44 -06:00
parent d8cbe96875
commit e91c329feb

View File

@@ -101,6 +101,7 @@ namespace ntfysh_client
// ok, show the window // ok, show the window
Show(); Show();
ButtonClose.Focus(); // make sure the window is focused, not the title box.
SetWindowPosition(); SetWindowPosition();
if (playNotificationSound) PlayNotificationSound(); if (playNotificationSound) PlayNotificationSound();
@@ -206,6 +207,7 @@ namespace ntfysh_client
{ {
Opacity = 0; Opacity = 0;
ShowNotification("Title", "Message"); ShowNotification("Title", "Message");
ButtonClose.Focus();
Visible = false; Visible = false;
Opacity = 1; Opacity = 1;
} }