Don't set viewport for 1x1 windows with scaling

This commit is contained in:
Shawn Wallace 2025-04-13 23:50:13 -04:00
parent 555f9492ad
commit 0cd5059c42
5 changed files with 106 additions and 49 deletions

View file

@ -128,7 +128,9 @@ impl SurfaceData {
fn update_viewport(&self, dims: WindowDims, size_hints: Option<WmNormalHints>) {
let width = (dims.width as f64 / self.scale_factor) as i32;
let height = (dims.height as f64 / self.scale_factor) as i32;
self.viewport.set_destination(width, height);
if width > 0 && height > 0 {
self.viewport.set_destination(width, height);
}
debug!("{} viewport: {width}x{height}", self.server.id());
if let Some(hints) = size_hints {
let Some(SurfaceRole::Toplevel(Some(data))) = &self.role else {