mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
fix: respect tray icon behavior
This commit is contained in:
@@ -337,7 +337,7 @@ namespace GHelper.Input
|
||||
if (e.Modifier == (ModifierKeys.Control | ModifierKeys.Shift))
|
||||
{
|
||||
if (e.Key == keyProfile) modeControl.CyclePerformanceMode();
|
||||
if (e.Key == keyApp) Program.SettingsToggle();
|
||||
if (e.Key == keyApp) Program.SettingsToggle("", true);
|
||||
if (e.Key == Keys.F20) KeyProcess("m3");
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ namespace GHelper.Input
|
||||
{
|
||||
Program.settingsForm.BeginInvoke(delegate
|
||||
{
|
||||
Program.SettingsToggle();
|
||||
Program.SettingsToggle("", true);
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -213,13 +213,13 @@ namespace GHelper
|
||||
SetAutoModes(true);
|
||||
}
|
||||
|
||||
public static void SettingsToggle(string action = "")
|
||||
public static void SettingsToggle(string action = "", bool checkForFocus = false)
|
||||
{
|
||||
if (settingsForm.Visible)
|
||||
{
|
||||
// If helper window is not on top, this just focuses on the app again
|
||||
// Pressing the ghelper button again will hide the app
|
||||
if (!settingsForm.HasAnyFocus())
|
||||
if (checkForFocus && !settingsForm.HasAnyFocus())
|
||||
{
|
||||
settingsForm.ShowAll();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user