Skip to content

Commit

Permalink
Disable "Stay on Top" setting of IToolFormAutoConfigs on Unix
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Sep 7, 2020
1 parent f1ef8c6 commit 329a7de
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/BizHawk.Client.EmuHawk/tools/ToolManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,21 @@ public void AutoLoad()
private void RefreshSettings(Form form, ToolStripItemCollection menu, ToolDialogSettings settings, int idx)
{
((ToolStripMenuItem)menu[idx + 0]).Checked = settings.SaveWindowPosition;
((ToolStripMenuItem)menu[idx + 1]).Checked = settings.TopMost;
var stayOnTopItem = (ToolStripMenuItem)menu[idx + 1];
stayOnTopItem.Checked = settings.TopMost;
if (OSTailoredCode.IsUnixHost)
{
// This is the job of the WM, and is usually exposed in window decorations or a context menu on them
stayOnTopItem.Enabled = false;
stayOnTopItem.Visible = false;
}
else
{
form.TopMost = settings.TopMost;
}
((ToolStripMenuItem)menu[idx + 2]).Checked = settings.FloatingWindow;
((ToolStripMenuItem)menu[idx + 3]).Checked = settings.AutoLoad;

form.TopMost = settings.TopMost;

// do we need to do this OnShown() as well?
form.Owner = settings.FloatingWindow ? null : _owner;
}
Expand Down

0 comments on commit 329a7de

Please sign in to comment.