shell: add workspace helper module
This commit is contained in:
parent
74a4ed1058
commit
e0da1e779b
7 changed files with 256 additions and 20 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue