Skip to content

Commit

Permalink
render: draw borders before rendering views
Browse files Browse the repository at this point in the history
Menus, tooltips, etc. can extend beyond a view's borders.  Render views
after their borders so floating content appears on top.

Unfocused floating content can still be obscured by views higher in the
stack and the focused view.
  • Loading branch information
keithhub authored and ifreund committed Aug 7, 2021
1 parent 2fc0875 commit 556d790
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions river/render.zig
Original file line number Diff line number Diff line change
Expand Up @@ -93,32 +93,32 @@ pub fn renderOutput(output: *Output) void {
it = ViewStack(View).iter(output.views.last, .reverse, output.current.tags, renderFilter);
while (it.next()) |view| {
if (view.current.focus != 0 or view.current.float) continue;
renderView(output, view, &now);
if (view.draw_borders) renderBorders(output, view, &now);
renderView(output, view, &now);
}

// focused, non-floating views
it = ViewStack(View).iter(output.views.last, .reverse, output.current.tags, renderFilter);
while (it.next()) |view| {
if (view.current.focus == 0 or view.current.float) continue;
renderView(output, view, &now);
if (view.draw_borders) renderBorders(output, view, &now);
renderView(output, view, &now);
}

// non-focused, floating views
it = ViewStack(View).iter(output.views.last, .reverse, output.current.tags, renderFilter);
while (it.next()) |view| {
if (view.current.focus != 0 or !view.current.float) continue;
renderView(output, view, &now);
if (view.draw_borders) renderBorders(output, view, &now);
renderView(output, view, &now);
}

// focused, floating views
it = ViewStack(View).iter(output.views.last, .reverse, output.current.tags, renderFilter);
while (it.next()) |view| {
if (view.current.focus == 0 or !view.current.float) continue;
renderView(output, view, &now);
if (view.draw_borders) renderBorders(output, view, &now);
renderView(output, view, &now);
}

if (build_options.xwayland) renderXwaylandUnmanaged(output, &now);
Expand Down

0 comments on commit 556d790

Please sign in to comment.