From 66b94d4983071495630eeb4e914c714801aa5d7c Mon Sep 17 00:00:00 2001 From: TGSAN Date: Thu, 27 Jun 2019 17:15:53 +0800 Subject: [PATCH] Fixed bug of #2379 pullrequestreview-254461303 Fixed bug of #2379 pullrequestreview-254461303 Redundant paintings when user move mouse on the icon, pixel by pixel. --- shadowsocks-csharp/View/MenuViewController.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index 1d8ed5b6..5268d57b 100644 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -86,7 +86,6 @@ namespace Shadowsocks.View _notifyIcon.MouseClick += notifyIcon1_Click; _notifyIcon.MouseDoubleClick += notifyIcon1_DoubleClick; _notifyIcon.BalloonTipClosed += _notifyIcon_BalloonTipClosed; - _notifyIcon.MouseMove += _notifyIcon_MouseMove; controller.TrafficChanged += controller_TrafficChanged; this.updateChecker = new UpdateChecker(); @@ -108,11 +107,6 @@ namespace Shadowsocks.View } } - private void _notifyIcon_MouseMove(object sender, MouseEventArgs e) - { - UpdateTrayIcon(); - } - private void controller_TrafficChanged(object sender, EventArgs e) { if (icon_baseBitmap == null) @@ -632,6 +626,7 @@ namespace Shadowsocks.View private void notifyIcon1_Click(object sender, MouseEventArgs e) { + UpdateTrayIcon(); if (e.Button == MouseButtons.Middle) { ShowLogForm();