aboutsummaryrefslogtreecommitdiff
path: root/src/command/close_view.zig
blob: 1724b57fc85df370f34b3a4b12c4534162791437 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
const c = @import("../c.zig");

const Arg = @import("../command.zig").Arg;
const Seat = @import("../seat.zig").Seat;

/// Close the focused view, if any.
pub fn close_view(seat: *Seat, arg: Arg) void {
    if (seat.focused_view) |view| {
        // Note: we don't call arrange() here as it will be called
        // automatically when the view is unmapped.
        view.close();
    }
}