apprt/gtk: add toggle_maximize keybind and window-maximize config option

This commit is contained in:
Adam Wolf
2025-01-10 22:42:41 -06:00
parent 5a4aac7e09
commit 8102fddceb
8 changed files with 59 additions and 0 deletions

View File

@@ -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,