diff --git a/src/apprt/gtk/Window.zig b/src/apprt/gtk/Window.zig index 0b631ea362..0f9290039c 100644 --- a/src/apprt/gtk/Window.zig +++ b/src/apprt/gtk/Window.zig @@ -670,7 +670,13 @@ fn gtkWindowNotifyFullscreened( ud: ?*anyopaque, ) callconv(.C) void { const self = userdataSelf(ud orelse return); - self.headerbar.setVisible(c.gtk_window_is_fullscreen(@ptrCast(object)) == 0); + const fullscreened = c.gtk_window_is_fullscreen(@ptrCast(object)) != 0; + if (!fullscreened) { + self.headerbar.setVisible(self.app.config.@"gtk-titlebar"); + return; + } + + self.headerbar.setVisible(true); } // Note: we MUST NOT use the GtkButton parameter because gtkActionNewTab