Compare commits

..

3 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
9bcc188949 Final verification complete
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-21 10:03:30 +00:00
copilot-swe-agent[bot]
44c1559d38 Fix Desktop file selection by using consistent IsCursorActivated check
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2025-10-21 10:01:51 +00:00
copilot-swe-agent[bot]
f4c87f83a0 Initial plan 2025-10-21 09:53:27 +00:00
2 changed files with 4 additions and 25 deletions

View File

@@ -23,7 +23,6 @@ using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using Wpf.Ui.Violeta.Win32;
using ToolTipIcon = Wpf.Ui.Violeta.Win32.ToolTipIcon;
@@ -150,30 +149,9 @@ internal partial class TrayIconManager : IDisposable
Action closeEvent = null)
{
var icon = GetInstance()._icon;
try
{
// Use reflection to call ShowBalloonTip to avoid JIT compilation errors
// when the method signature doesn't match the expected one
var showBalloonTipMethod = icon.GetType().GetMethod("ShowBalloonTip",
new[] { typeof(int), typeof(string), typeof(string), typeof(ToolTipIcon) });
if (showBalloonTipMethod != null)
{
showBalloonTipMethod.Invoke(icon, new object[] { timeout, title, content, isError ? ToolTipIcon.Error : ToolTipIcon.Info });
icon.BalloonTipClicked += OnIconOnBalloonTipClicked;
icon.BalloonTipClosed += OnIconOnBalloonTipClosed;
}
else
{
System.Diagnostics.Debug.WriteLine($"ShowBalloonTip method not found: {title} - {content}");
}
}
catch (Exception ex)
{
// Fallback: If reflection fails, log and continue without showing notification
System.Diagnostics.Debug.WriteLine($"ShowBalloonTip failed: {title} - {content}. Error: {ex.Message}");
}
icon.ShowBalloonTip(timeout, title, content, isError ? ToolTipIcon.Error : ToolTipIcon.Info);
icon.BalloonTipClicked += OnIconOnBalloonTipClicked;
icon.BalloonTipClosed += OnIconOnBalloonTipClosed;
void OnIconOnBalloonTipClicked(object sender, EventArgs e)
{

View File

@@ -0,0 +1 @@
.