[gtk+] Try to delete any existing W32 status icons when DPI changes



commit 246549323752c58509b1fd9bb322fdd127f9ee21
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date:   Mon Jul 18 10:32:04 2016 +0000

    Try to delete any existing W32 status icons when DPI changes
    
    Fixes some or all of the issues reported in
    https://github.com/hexchat/hexchat/issues/1423

 gtk/deprecated/gtkstatusicon.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/deprecated/gtkstatusicon.c b/gtk/deprecated/gtkstatusicon.c
index a29c1b7..7df11cd 100644
--- a/gtk/deprecated/gtkstatusicon.c
+++ b/gtk/deprecated/gtkstatusicon.c
@@ -728,6 +728,12 @@ wndproc (HWND   hwnd,
          GtkStatusIcon *status_icon = GTK_STATUS_ICON (rover->data);
          GtkStatusIconPrivate *priv = status_icon->priv;
 
+         /* taskbar_created_msg is also fired when DPI changes. Try to delete existing icons if possible. */
+         if (!Shell_NotifyIconW (NIM_DELETE, &priv->nid))
+         {
+               g_warning (G_STRLOC ": Shell_NotifyIcon(NIM_DELETE) on existing icon failed");
+         }
+
          priv->nid.hWnd = hwnd;
          priv->nid.uID = status_icon_id++;
          priv->nid.uCallbackMessage = WM_GTK_TRAY_NOTIFICATION;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]