summaryrefslogtreecommitdiff
path: root/src/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw.zig')
-rw-r--r--src/draw.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/draw.zig b/src/draw.zig
index 2d757635..0998db24 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -119,6 +119,22 @@ pub fn place(p: *Pardes, s: *Surface) void {
s.addRegion(.{ .kind = .workspace_tag, .rect = .{ .x = 0, .y = 0, .w = s.cols, .h = p.topBarHeight() } });
// A column carried to the window's right edge shows where it lands as a
// rail in the last cell: the layers under it stop a cell short.
+ // Lift: the focused pane rises, the others settle back, each on its
+ // spring; a notice floats while Lift is on.
+ for (&p.panes, &p.lifts, &p.lift_serials, 0..) |slot, *spring, *serial, id| {
+ const pane = slot orelse continue;
+ if (serial.* != pane.serial) {
+ serial.* = pane.serial;
+ spring.* = .{};
+ }
+ spring.retarget(if (p.settings.lift and id == p.active) 1 else 0, p.stepped_ns);
+ _ = spring.step(p.stepped_ns);
+ }
+ for (s.regions[0..s.nregions]) |*region| switch (region.kind) {
+ .grip, .tag, .body, .rail => region.lift = p.lifts[region.owner].value(p.stepped_ns),
+ .notice => region.lift = if (p.settings.lift) 1 else 0,
+ else => {},
+ };
if (p.drag == .column_move) rail: {
const d = p.drag.column_move;
const source = layout.columnBySerial(p, d.serial) orelse break :rail;