Fixed the GTK3 window-state handler so minimizing via taskbar no longer immediately deiconifies the window again. Specifically, I removed the conflicting gtk_window_deiconify(wid) call from the iconify path in mg_windowstate_cb, while preserving the existing tray-hide behavior and window state bookkeeping. This restores expected toggle behavior when clicking the taskbar icon on a maximized window.

This commit is contained in:
2026-02-18 13:11:04 -07:00
parent e2db0ec3e5
commit e3f624d2bb

View File

@@ -663,14 +663,13 @@ fe_set_title (session *sess)
static gboolean
mg_windowstate_cb (GtkWindow *wid, GdkEventWindowState *event, gpointer userdata)
{
if ((event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) &&
(event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) &&
prefs.hex_gui_tray_minimize && prefs.hex_gui_tray &&
gtkutil_tray_icon_supported (wid))
{
tray_toggle_visibility (TRUE);
gtk_window_deiconify (wid);
}
if ((event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) &&
(event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) &&
prefs.hex_gui_tray_minimize && prefs.hex_gui_tray &&
gtkutil_tray_icon_supported (wid))
{
tray_toggle_visibility (TRUE);
}
prefs.hex_gui_win_state = 0;
if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)