mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 07:46:12 +03:00
@ -204,6 +204,7 @@ pub fn init(self: *Window, app: *App) !void {
|
||||
}
|
||||
|
||||
_ = c.g_signal_connect_data(gtk_window, "notify::decorated", c.G_CALLBACK(>kWindowNotifyDecorated), self, null, c.G_CONNECT_DEFAULT);
|
||||
_ = c.g_signal_connect_data(gtk_window, "notify::fullscreened", c.G_CALLBACK(>kWindowNotifyFullscreened), self, null, c.G_CONNECT_DEFAULT);
|
||||
|
||||
// If we are disabling decorations then disable them right away.
|
||||
if (!app.config.@"window-decoration") {
|
||||
@ -606,6 +607,15 @@ fn gtkWindowNotifyDecorated(
|
||||
}
|
||||
}
|
||||
|
||||
fn gtkWindowNotifyFullscreened(
|
||||
object: *c.GObject,
|
||||
_: *c.GParamSpec,
|
||||
ud: ?*anyopaque,
|
||||
) callconv(.C) void {
|
||||
const self = userdataSelf(ud orelse return);
|
||||
self.headerbar.setVisible(c.gtk_window_is_fullscreen(@ptrCast(object)) == 0);
|
||||
}
|
||||
|
||||
// Note: we MUST NOT use the GtkButton parameter because gtkActionNewTab
|
||||
// sends an undefined value.
|
||||
fn gtkTabNewClick(_: *c.GtkButton, ud: ?*anyopaque) callconv(.C) void {
|
||||
|
Reference in New Issue
Block a user