resize windows when the monitor state changes

this may need more work later but for now this makes using mez in
another compositor smoother
This commit is contained in:
Squibid 2026-02-02 15:46:49 -05:00
parent 3c65fd8339
commit 0bb8c83300
Signed by: squibid
GPG key ID: BECE5684D3C4005D
2 changed files with 4 additions and 0 deletions

View file

@ -88,6 +88,8 @@ local master = function()
end end
}) })
mez.hook.add("OutputStateChange", { callback = tile_all })
mez.hook.add("ViewMapPre", { mez.hook.add("ViewMapPre", {
callback = function(v) callback = function(v)
if ctx.tags[ctx.tag_id].master == nil then if ctx.tags[ctx.tag_id].master == nil then

View file

@ -282,6 +282,8 @@ fn handleRequestState(
if (!output.wlr_output.commitState(event.state)) { if (!output.wlr_output.commitState(event.state)) {
std.log.warn("failed to set output state {}", .{event.state}); std.log.warn("failed to set output state {}", .{event.state});
} }
server.events.exec("OutputStateChange", .{});
} }
fn handleFrame( fn handleFrame(