aboutsummaryrefslogtreecommitdiff
path: root/src/render.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.zig')
-rw-r--r--src/render.zig20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/render.zig b/src/render.zig
index 99bddc1..d8b46ec 100644
--- a/src/render.zig
+++ b/src/render.zig
@@ -39,6 +39,26 @@ pub fn renderOutput(output: *Output) void {
if (view.current_box.width == 0 or view.current_box.height == 0) {
continue;
}
+ // Floating views are rendered on top of normal views
+ if (view.floating) {
+ continue;
+ }
+ renderView(output.*, view, &now);
+ renderBorders(output.*, view, &now);
+ }
+
+ // Render floating views
+ it = ViewStack(View).reverseIterator(output.views.last, output.current_focused_tags);
+ while (it.next()) |node| {
+ const view = &node.view;
+ // This check prevents a race condition when a frame is requested
+ // between mapping of a view and the first configure being handled.
+ if (view.current_box.width == 0 or view.current_box.height == 0) {
+ continue;
+ }
+ if (!view.floating) {
+ continue;
+ }
renderView(output.*, view, &now);
renderBorders(output.*, view, &now);
}