From 7cfa3b35133c7c5a2b3871f48120c4505b55aa0f Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 14:18:23 -0700 Subject: [PATCH] Added a Windows-only helper (mg_win32_allow_autohide_taskbar) that gets the native HWND and calls SetWindowPos(..., HWND_NOTOPMOST, ...) for non-fullscreen window-state transitions, so a maximized ZoiteChat window no longer blocks the taskbar auto-hide reveal edge. Hooked that helper into mg_windowstate_cb so it runs whenever the main window state changes (while preserving existing maximize/fullscreen preference handling). --- src/fe-gtk/maingui.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c index 4add6786..1a58d01d 100644 --- a/src/fe-gtk/maingui.c +++ b/src/fe-gtk/maingui.c @@ -58,6 +58,36 @@ #ifdef G_OS_WIN32 #include +#include + +static void +mg_win32_allow_autohide_taskbar (GtkWindow *window, GdkEventWindowState *event) +{ + GdkWindow *gdk_window; + HWND hwnd; + + if (!window || !event) + return; + + if ((event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0) + return; + + gdk_window = gtk_widget_get_window (GTK_WIDGET (window)); + if (!gdk_window) + return; + + hwnd = gdk_win32_window_get_handle (gdk_window); + if (!hwnd) + return; + + SetWindowPos (hwnd, + HWND_NOTOPMOST, + 0, + 0, + 0, + 0, + SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE | SWP_NOOWNERZORDER); +} #endif #define ICON_TAB_DETACH "zc-menu-detach" @@ -659,6 +689,10 @@ mg_windowstate_cb (GtkWindow *wid, GdkEventWindowState *event, gpointer userdata menu_set_fullscreen (current_sess->gui, prefs.hex_gui_win_fullscreen); +#ifdef G_OS_WIN32 + mg_win32_allow_autohide_taskbar (wid, event); +#endif + return FALSE; }