forge
Explore
Log in

Don't you dare go Hollow

layout: Use actual working area on workspace creation

Browse files at this commit

cf123ddcd029e3508e4b3efdddac62f605bd2610Ivan MolodetskikhParent: dbcc118
Fixes https://github.com/YaLTeR/niri/issues/19
src/layout.rsmodified+2 -1
@@ -1407,10 +1407,11 @@ impl Monitor<Window> {
1407 1407
1408 impl<W: LayoutElement> Workspace<W> {1408 impl<W: LayoutElement> Workspace<W> {
1409 fn new(output: Output) -> Self {1409 fn new(output: Output) -> Self {
1410+ let working_area = layer_map_for_output(&output).non_exclusive_zone();
1410 Self {1411 Self {
1411 original_output: OutputId::new(&output),1412 original_output: OutputId::new(&output),
1412 view_size: output_size(&output),1413 view_size: output_size(&output),
1413- working_area: Rectangle::from_loc_and_size((0, 0), output_size(&output)),1414+ working_area,
1414 output: Some(output),1415 output: Some(output),
1415 columns: vec![],1416 columns: vec![],
1416 active_column_idx: 0,1417 active_column_idx: 0,