river/src/command/close_view.zig

14 lines
382 B
Zig
Raw Normal View History

2020-04-18 04:41:04 -07:00
const c = @import("../c.zig");
const Arg = @import("../command.zig").Arg;
2020-05-02 07:35:15 -07:00
const Seat = @import("../seat.zig");
2020-04-18 04:41:04 -07:00
/// Close the focused view, if any.
pub fn close_view(seat: *Seat, arg: Arg) void {
if (seat.focused_view) |view| {
2020-04-18 08:07:57 -07:00
// Note: we don't call arrange() here as it will be called
// automatically when the view is unmapped.
view.close();
2020-04-18 04:41:04 -07:00
}
}