fixed comment
Browse files
+1 −4 src/layout/normie.rs
| @@ -3,6 +3,7 @@ use x11rb::protocol::xproto::Window; | |||
| 3 | 3 | ||
| 4 | pub struct NormieLayout; | 4 | pub struct NormieLayout; |
| 5 | 5 | ||
| 6 | +// This layout should return a no-op similar to DWM.C's "null" mode. | ||
| 6 | impl Layout for NormieLayout { | 7 | impl Layout for NormieLayout { |
| 7 | fn name(&self) -> &'static str { | 8 | fn name(&self) -> &'static str { |
| 8 | super::NORMIE | 9 | super::NORMIE |
| @@ -15,19 +16,15 @@ impl Layout for NormieLayout { | |||
| 15 | screen_height: u32, | 16 | screen_height: u32, |
| 16 | _gaps: &GapConfig, | 17 | _gaps: &GapConfig, |
| 17 | ) -> Vec<WindowGeometry> { | 18 | ) -> Vec<WindowGeometry> { |
| 18 | - // Floating layout: all windows open centered with a reasonable default size | ||
| 19 | - // This mimics dwm's NULL layout behavior where windows float freely | ||
| 20 | const DEFAULT_WIDTH_RATIO: f32 = 0.6; | 19 | const DEFAULT_WIDTH_RATIO: f32 = 0.6; |
| 21 | const DEFAULT_HEIGHT_RATIO: f32 = 0.6; | 20 | const DEFAULT_HEIGHT_RATIO: f32 = 0.6; |
| 22 | 21 | ||
| 23 | windows | 22 | windows |
| 24 | .iter() | 23 | .iter() |
| 25 | .map(|_| { | 24 | .map(|_| { |
| 26 | - // Calculate default window dimensions (60% of screen) | ||
| 27 | let width = ((screen_width as f32) * DEFAULT_WIDTH_RATIO) as u32; | 25 | let width = ((screen_width as f32) * DEFAULT_WIDTH_RATIO) as u32; |
| 28 | let height = ((screen_height as f32) * DEFAULT_HEIGHT_RATIO) as u32; | 26 | let height = ((screen_height as f32) * DEFAULT_HEIGHT_RATIO) as u32; |
| 29 | 27 | ||
| 30 | - // Center the window on the screen | ||
| 31 | let x = ((screen_width - width) / 2) as i32; | 28 | let x = ((screen_width - width) / 2) as i32; |
| 32 | let y = ((screen_height - height) / 2) as i32; | 29 | let y = ((screen_height - height) / 2) as i32; |
| 33 | 30 | ||