From 0bb8c83300074732aab2b9acd9479d19a91f7135 Mon Sep 17 00:00:00 2001 From: Squibid Date: Mon, 2 Feb 2026 15:46:49 -0500 Subject: [PATCH] resize windows when the monitor state changes this may need more work later but for now this makes using mez in another compositor smoother --- runtime/share/mezzaluna/master.lua | 2 ++ src/Output.zig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/runtime/share/mezzaluna/master.lua b/runtime/share/mezzaluna/master.lua index a420b8b..a569a0b 100644 --- a/runtime/share/mezzaluna/master.lua +++ b/runtime/share/mezzaluna/master.lua @@ -88,6 +88,8 @@ local master = function() end }) + mez.hook.add("OutputStateChange", { callback = tile_all }) + mez.hook.add("ViewMapPre", { callback = function(v) if ctx.tags[ctx.tag_id].master == nil then diff --git a/src/Output.zig b/src/Output.zig index 96bd5d2..166d6e7 100644 --- a/src/Output.zig +++ b/src/Output.zig @@ -282,6 +282,8 @@ fn handleRequestState( if (!output.wlr_output.commitState(event.state)) { std.log.warn("failed to set output state {}", .{event.state}); } + + server.events.exec("OutputStateChange", .{}); } fn handleFrame(