Add settings to minimize and raise the windows together

Both are checkboxes in Manage Skins, Colors and Fonts and default to on.
The entry window minimizes and restores the other windows with itself.
Activating any window raises the others that are not minimized.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-25 10:56:53 +00:00
co-authored by Claude Sonnet 5.5
parent ab81476e27
commit 36af4340cf
5 changed files with 51 additions and 7 deletions
@@ -84,11 +84,13 @@ public sealed partial class EntryWindow : Window
PropertyChanged += (_, e) =>
{
if (e.Property == WindowStateProperty
&& session.Settings.MinimizeWindowsTogether
&& WindowState is WindowState.Minimized or WindowState.Normal)
{
FollowWindowState(WindowState);
}
};
Activated += (_, _) => RaiseTogether(this);
Closed += (_, _) =>
{
foreach (Window window in openWindows.Values.ToList())
@@ -192,6 +194,27 @@ public sealed partial class EntryWindow : Window
}
}
private long lastRaise;
/// Brings the other windows that are not minimized above whatever else is
/// on screen, then puts `front` back on top. Activating them fires their
/// own Activated events, so raises within half a second are ignored.
private void RaiseTogether(Window front)
{
if (!session.Settings.RaiseWindowsTogether || Environment.TickCount64 - lastRaise < 500)
{
return;
}
lastRaise = Environment.TickCount64;
IEnumerable<Window> others = Placed().Concat(secondRadio is null ? [] : [secondRadio])
.Where(w => w != front && w.WindowState != WindowState.Minimized);
foreach (Window window in others)
{
window.Activate();
}
front.Activate();
}
/// The keyboard follows the operator to the other radio.
private void FollowActiveRadio(int number)
{