aboutsummaryrefslogtreecommitdiff
path: root/src/command/toggle_float.zig
blob: 38250b8e8fd4e0d97d48ab662a6529f4dd119174 (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;

/// Make the focused view float or stop floating, depending on its current
/// state.
pub fn toggleFloat(seat: *Seat, arg: Arg) void {
    if (seat.focused_view) |view| {
        view.setFloating(!view.floating);
        view.output.root.arrange();
    }
}