mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-16 23:06:20 +00:00
apprt/gtk: add toggle_maximize keybind and window-maximize config option
This commit is contained in:
@@ -646,6 +646,16 @@ pub fn init(
|
||||
// an initial size shouldn't stop our terminal from working.
|
||||
log.warn("unable to set initial window size: {s}", .{err});
|
||||
};
|
||||
|
||||
if (config.@"window-maximize") {
|
||||
rt_app.performAction(
|
||||
.{ .surface = self },
|
||||
.toggle_maximize,
|
||||
{},
|
||||
) catch |err| {
|
||||
log.warn("unable to maximize window: {s}", .{err});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (config.title) |title| {
|
||||
@@ -4168,6 +4178,12 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
||||
{},
|
||||
),
|
||||
|
||||
.toggle_maximize => try self.rt_app.performAction(
|
||||
.{ .surface = self },
|
||||
.toggle_maximize,
|
||||
{},
|
||||
),
|
||||
|
||||
.toggle_fullscreen => try self.rt_app.performAction(
|
||||
.{ .surface = self },
|
||||
.toggle_fullscreen,
|
||||
|
Reference in New Issue
Block a user