diff --git a/src/common/zoitechat.c b/src/common/zoitechat.c index 10ce8bc1..eeb31fba 100644 --- a/src/common/zoitechat.c +++ b/src/common/zoitechat.c @@ -229,6 +229,10 @@ zoitechat_remote_win32 (void) { sent = zoitechat_send_command_to_existing (hwnd, arg_command) || sent; } + else if (arg_existing) + { + sent = zoitechat_send_command_to_existing (hwnd, "__WIN32_TASKBAR_TOGGLE__") || sent; + } if (arg_urls) { diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 685725f8..f72a6c27 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -3892,7 +3892,17 @@ mg_win32_filter (GdkXEvent *xevent, GdkEvent *event, gpointer data) if (command) { - handle_command (current_sess, command, FALSE); + if (strcmp (command, "__WIN32_TASKBAR_TOGGLE__") == 0) + { + if (gtk_widget_get_visible (current_sess->gui->window)) + fe_ctrl_gui (current_sess, FE_GUI_ICONIFY, 0); + else + fe_ctrl_gui (current_sess, FE_GUI_SHOW, 0); + } + else + { + handle_command (current_sess, command, FALSE); + } g_free (command); return GDK_FILTER_REMOVE; }