shell: add workspace helper module

This commit is contained in:
Victoria Brekenfeld 2021-12-17 17:53:01 +01:00
parent 74a4ed1058
commit e0da1e779b
7 changed files with 256 additions and 20 deletions

View file

@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::backend::x11::X11State;
use smithay::{desktop::Space, reexports::wayland_server::Display};
use crate::{backend::x11::X11State, shell::workspaces::Workspaces};
use smithay::reexports::wayland_server::Display;
use std::{cell::RefCell, rc::Rc, time::Instant};
pub struct State {
pub display: Rc<RefCell<Display>>,
pub spaces: Space, //TODO: Multiple workspaces
pub spaces: Workspaces,
pub start_time: Instant,
pub should_stop: bool,
@ -34,7 +34,7 @@ impl State {
pub fn new(display: Display) -> State {
State {
display: Rc::new(RefCell::new(display)),
spaces: Space::new(slog_scope::logger() /*TODO*/),
spaces: Workspaces::new(),
start_time: Instant::now(),
should_stop: false,