~kennylevinsen/clayrs

896612e65e232704184d20dca276d4c692c54274 — Kenny Levinsen 1 year, 4 months ago 8a95c42 master
Fix toplevel rendition
2 files changed, 12 insertions(+), 4 deletions(-)

M src/mgr/output.rs
M src/mgr/presentation.rs
M src/mgr/output.rs => src/mgr/output.rs +6 -2
@@ 46,13 46,17 @@ impl Output {
    }

    pub fn layout(&self, containers: &mut HashMap<Uuid, Container>) {
        let layout = &self.layouts[self.active_layout];
        layout.layout(&self.layout, containers, &self.usable_area);
        if let Some(fullscreen) = self.fullscreen {
            for (_, con) in containers.iter_mut() {
                con.set_dimensions((0, 0), (0,0));
            }
            let container = containers
                .get_mut(&fullscreen)
                .expect("no container with that ID");
            container.set_dimensions((self.usable_area.x, self.usable_area.y), (self.usable_area.width as u32, self.usable_area.height as u32));
        } else {
            let layout = &self.layouts[self.active_layout];
            layout.layout(&self.layout, containers, &self.usable_area);
        }
    }


M src/mgr/presentation.rs => src/mgr/presentation.rs +6 -2
@@ 282,6 282,9 @@ impl Presentation {
        }
        self.containers.clear();
        for (id, con) in containers {
            if con.size == (0,0) {
                continue;
            }
            // Focus capture device
            let container_rect = self.clay.draw_create_rect_view(con.size, self.colors.bg);
            container_rect.set_position(con.position);


@@ 352,8 355,9 @@ impl Presentation {
                bound: view.current_container.is_some(),
            });
            if let Some(container) = view.current_container {
                let con = self.containers.get_mut(&container).unwrap();
                con.view_idx = Some(idx);
                if let Some(con) = self.containers.get_mut(&container) {
                    con.view_idx = Some(idx);
                }
            }
        }
        self.views.push(ViewInfo {