diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2016-07-18 10:32:04 +0000 |
---|---|---|
committer | Руслан Ижбулатов <lrn1986@gmail.com> | 2016-07-18 10:32:04 +0000 |
commit | 246549323752c58509b1fd9bb322fdd127f9ee21 (patch) | |
tree | 3e6d9d90fdd95a94b34da1d47a9f596edadd936a | |
parent | 02c89f7e8fe055c5523c8c221d2678ada12b055d (diff) | |
download | gtk+-246549323752c58509b1fd9bb322fdd127f9ee21.tar.gz |
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
-rw-r--r-- | 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 a29c1b7ede..7df11cdec1 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; |