Skip to content

Commit

Permalink
fix: also respect gtk-titlebar value in fullscreened callback
Browse files Browse the repository at this point in the history
  • Loading branch information
aw1875 committed Jan 15, 2025
1 parent 9d7a289 commit b0505c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/apprt/gtk/Window.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0505c4

Please sign in to comment.