atagen

monolith

public
Star0
Watch0

Commit e1b42c2ebb09

tarball

atagen <boss@atagen.co>2026-10-18 03:18 UTC

2 files changed+7-2
monolith: size lock surfaces and output captures after the transform

Both used the raw mode size, so on a rotated output the locker was configured with the wrong dimensions and output captures drew the rotated scene into a buffer of the wrong shape.
Modified file: crates/monolith/src/capture.rs+5 additions−1 deletions
@@ -161,7 +161,11 @@ impl State {
161161
162162 fn target_size(&self, target: &Target) -> Option<(i32, i32)> {
163163 let size: (i32, i32) = match target {
164- Target::Output(name) => self.output_named(name)?.1.current_mode()?.size.into(),
164+ Target::Output(name) => {
165+ let output = self.output_named(name)?.1;
166+ let mode = output.current_mode()?;
167+ output.current_transform().transform_size(mode.size).into()
168+ }
165169 Target::Window(id) => self.wm.window(*id)?.geometry().size.into(),
166170 };
167171 (size.0 > 0 && size.1 > 0).then_some(size)
Modified file: crates/monolith/src/lock.rs+2 additions−1 deletions
@@ -88,7 +88,8 @@ fn configure(surface: &LockSurface, output: &Output) {
8888 let Some(mode) = output.current_mode() else {
8989 return;
9090 };
91- let size = (mode.size.w as u32, mode.size.h as u32);
91+ let size = output.current_transform().transform_size(mode.size);
92+ let size = (size.w as u32, size.h as u32);
9293 surface.with_pending_state(|s| s.size = Some(size.into()));
9394 surface.send_configure();
9495 }