[gtk+/gtk-2-24] Try to delete any existing W32 status icons when DPI changes



commit 0e9e0bdcf3b8013a19d947ae03ea6e154d5492f3
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/gtkstatusicon.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index 54cccba..68561fa 100644
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -721,6 +721,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]