main: launch main loop and wayland sock

This commit is contained in:
Victoria Brekenfeld 2021-12-15 18:00:28 +01:00
parent b7da65117e
commit 2698c06f50
5 changed files with 318 additions and 2 deletions

19
src/state.rs Normal file
View file

@ -0,0 +1,19 @@
// SPDX-License-Identifier: GPL-3.0-only
use std::{cell::RefCell, rc::Rc};
use smithay::reexports::wayland_server::Display;
pub struct State {
pub display: Rc<RefCell<Display>>,
pub should_stop: bool,
}
impl State {
pub fn new(display: Display) -> State {
State {
display: Rc::new(RefCell::new(display)),
should_stop: false,
}
}
}