From dfdea33389a33da6a6ef21582b81a201973eeb31 Mon Sep 17 00:00:00 2001 From: Ben Buhse Date: Fri, 27 Feb 2026 12:07:24 -0600 Subject: [PATCH] Fix bug where windows don't have border on wm restart Before, if you restarted the WM with windows already present, any non-focused window would just not have a border (because borderes are only drawn on focus change, which happens for all new windows, but not exisiting ones). I guess this probably would've happened if users add new windows appending and didn't focus on new window spawns? Anyways, now we just tell new windows they're unfocused to draw the border on first render. --- src/Window.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Window.zig b/src/Window.zig index c8161b9..7ddf85e 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -97,6 +97,9 @@ pub fn create(context: *Context, river_window_v1: *river.WindowV1, output: ?*Out .output = output, .tags = if (output) |o| o.tags else 0x0001, .link = undefined, // Handled by the wl.list + // Ensure borders are applied on the first render cycle, even for windows that + // are never explicitly told they are unfocused (e.g. on WM restart). + .pending_render = .{ .focused = false }, }; window.river_window_v1.setListener(*Window, windowListener, window);