Skip to content

Commit

Permalink
(hopefully) fix mysterious disappearing window
Browse files Browse the repository at this point in the history
  • Loading branch information
cqjjjzr committed Dec 24, 2021
1 parent 6d8edd1 commit 549f14f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DesktopLyrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void ReceiveNotification(string sourceFileUrl, NotificationType type)
switch (type)
{
case NotificationType.PluginStartup:
while (!Debugger.IsAttached) System.Threading.Thread.Sleep(1);
// while (!Debugger.IsAttached) System.Threading.Thread.Sleep(1);
try
{
try
Expand Down
5 changes: 5 additions & 0 deletions FrmLyrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ private void FrmLyrics_Load(object sender, EventArgs e)
_settings.PosX = Left;
_settings.PosY = Top;
};
FormClosing += (o, args) =>
{
if (args.CloseReason == CloseReason.UserClosing)
args.Cancel = true;
};
}

public void UpdateFromSettings(SettingsObj settings)
Expand Down

0 comments on commit 549f14f

Please sign in to comment.