fix: also respect gtk-titlebar value in fullscreened callback

This commit is contained in:
Adam Wolf
2025-01-15 00:59:34 -06:00
committed by Mitchell Hashimoto
parent 80eb406b82
commit 1be89cb146

View File

@ -675,7 +675,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(false);
}
// Note: we MUST NOT use the GtkButton parameter because gtkActionNewTab