Fix text scaling in Bar

Before, we were missing the initial events from the wl_output, including
the scale. This meant that we weren't scaling the bar clock correctly.
To fix it, we just moved the wl_global binding into the .wl_output event

We also got rid of the hashmap of outputs in Globals and Context.
This commit is contained in:
Ben Buhse 2026-02-16 19:09:33 -06:00
commit 9b0bac12ff
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
4 changed files with 22 additions and 52 deletions

View file

@ -14,7 +14,6 @@ wl_compositor: *wl.Compositor,
wl_display: *wl.Display,
wl_registry: *wl.Registry,
wl_shm: *wl.Shm,
wl_outputs: *std.AutoHashMapUnmanaged(u32, *wl.Output),
river_layer_shell_v1: *river.LayerShellV1,
zwlr_layer_shell_v1: *zwlr.LayerShellV1,
@ -52,7 +51,6 @@ pub const Options = struct {
wl_display: *wl.Display,
wl_registry: *wl.Registry,
wl_shm: *wl.Shm,
wl_outputs: *std.AutoHashMapUnmanaged(u32, *wl.Output),
river_input_manager_v1: *river.InputManagerV1,
river_libinput_config_v1: *river.LibinputConfigV1,
@ -93,7 +91,6 @@ pub fn create(options: Options) !*Context {
.wl_display = options.wl_display,
.wl_registry = options.wl_registry,
.wl_shm = options.wl_shm,
.wl_outputs = options.wl_outputs,
.river_layer_shell_v1 = options.river_layer_shell_v1,
.zwlr_layer_shell_v1 = options.zwlr_layer_shell_v1,
.wallpaper_image = loadWallpaperImage(options.config),