diff --git a/GW Launcher/Forms/MainForm.cs b/GW Launcher/Forms/MainForm.cs index e797595..22b44cf 100644 --- a/GW Launcher/Forms/MainForm.cs +++ b/GW Launcher/Forms/MainForm.cs @@ -50,7 +50,7 @@ protected override void SetVisibleCore(bool value) if (!_allowVisible) { value = false; - if (!this.IsHandleCreated) CreateHandle(); + if (!IsHandleCreated) CreateHandle(); } base.SetVisibleCore(value); } @@ -275,14 +275,7 @@ private void MainForm_Deactivate(object sender, EventArgs e) private void NotifyIcon_MouseClick(object sender, MouseEventArgs e) { _allowVisible = true; - if (e.Button == MouseButtons.Right && Visible == false) - { - _keepOpen = true; - } - else - { - _keepOpen = false; - } + _keepOpen = e.Button == MouseButtons.Right && Visible == false; bool IsVisible(Point p) { @@ -292,6 +285,8 @@ bool IsVisible(Point p) var rect = NotifyIconHelper.GetIconRect(notifyIcon); var position = new Point(rect.Left, rect.Top); + RefreshUI(); + position.X -= Width / 2; if (position.Y > Screen.FromPoint(Cursor.Position).WorkingArea.Height / 2) { diff --git a/GW Launcher/GW Launcher.csproj b/GW Launcher/GW Launcher.csproj index 7e818ee..4d7d49d 100644 --- a/GW Launcher/GW Launcher.csproj +++ b/GW Launcher/GW Launcher.csproj @@ -13,8 +13,8 @@ x86;AnyCPU x86 portable - 13.8 - 13.8 + 13.9 + 13.9 2015-2023 GregLando113 True