diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-09-20 09:37:52 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-09-20 13:42:59 +0300 |
| commit | 37aea69715a61cb08fa3612a3f2e65d01df161f5 (patch) | |
| tree | f018377d30db0867015b4385974144be8a1bc324 /src | |
| parent | 7024a23d2c3ff0b116c73695eabddcc9db6238e4 (diff) | |
| download | niri-37aea69715a61cb08fa3612a3f2e65d01df161f5.tar.gz niri-37aea69715a61cb08fa3612a3f2e65d01df161f5.tar.bz2 niri-37aea69715a61cb08fa3612a3f2e65d01df161f5.zip | |
Move workspace options check to workspace tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout/mod.rs | 14 | ||||
| -rw-r--r-- | src/layout/workspace.rs | 6 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index c58fc284..370640b9 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -2561,13 +2561,6 @@ impl<W: LayoutElement> Layout<W> { "workspace base options must be synchronized with layout" ); - let options = Options::clone(&workspace.base_options) - .adjusted_for_scale(workspace.scale().fractional_scale()); - assert_eq!( - &*workspace.options, &options, - "workspace options must be base options adjusted for workspace scale" - ); - assert!( seen_workspace_id.insert(workspace.id()), "workspace id must be unique" @@ -2725,13 +2718,6 @@ impl<W: LayoutElement> Layout<W> { "workspace options must be synchronized with layout" ); - let options = Options::clone(&workspace.base_options) - .adjusted_for_scale(workspace.scale().fractional_scale()); - assert_eq!( - &*workspace.options, &options, - "workspace options must be base options adjusted for workspace scale" - ); - assert!( seen_workspace_id.insert(workspace.id()), "workspace id must be unique" diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 690baf17..d2340949 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -1787,6 +1787,12 @@ impl<W: LayoutElement> Workspace<W> { assert!(scale > 0.); assert!(scale.is_finite()); + let options = Options::clone(&self.base_options).adjusted_for_scale(scale); + assert_eq!( + &*self.options, &options, + "options must be base options adjusted for scale" + ); + assert!(self.view_size.w > 0.); assert!(self.view_size.h > 0.); |
