Skip to content

Commit 329a7de

Browse files
committed
Disable "Stay on Top" setting of IToolFormAutoConfigs on Unix
1 parent f1ef8c6 commit 329a7de

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/BizHawk.Client.EmuHawk/tools/ToolManager.cs

+12-3
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,21 @@ public void AutoLoad()
224224
private void RefreshSettings(Form form, ToolStripItemCollection menu, ToolDialogSettings settings, int idx)
225225
{
226226
((ToolStripMenuItem)menu[idx + 0]).Checked = settings.SaveWindowPosition;
227-
((ToolStripMenuItem)menu[idx + 1]).Checked = settings.TopMost;
227+
var stayOnTopItem = (ToolStripMenuItem)menu[idx + 1];
228+
stayOnTopItem.Checked = settings.TopMost;
229+
if (OSTailoredCode.IsUnixHost)
230+
{
231+
// This is the job of the WM, and is usually exposed in window decorations or a context menu on them
232+
stayOnTopItem.Enabled = false;
233+
stayOnTopItem.Visible = false;
234+
}
235+
else
236+
{
237+
form.TopMost = settings.TopMost;
238+
}
228239
((ToolStripMenuItem)menu[idx + 2]).Checked = settings.FloatingWindow;
229240
((ToolStripMenuItem)menu[idx + 3]).Checked = settings.AutoLoad;
230241

231-
form.TopMost = settings.TopMost;
232-
233242
// do we need to do this OnShown() as well?
234243
form.Owner = settings.FloatingWindow ? null : _owner;
235244
}

0 commit comments

Comments
 (0)