autocommit 2022-04-27 18:04:02 CEST
This commit is contained in:
parent
cff35fd7da
commit
57899b3f35
14 changed files with 173 additions and 66 deletions
15
src/state.rs
15
src/state.rs
|
|
@ -1,3 +1,4 @@
|
|||
use std::fmt::{Debug, Formatter};
|
||||
use {
|
||||
crate::{
|
||||
async_engine::{AsyncEngine, SpawnedFuture},
|
||||
|
|
@ -94,6 +95,12 @@ pub struct State {
|
|||
pub run_toplevel: Rc<RunToplevel>,
|
||||
}
|
||||
|
||||
impl Debug for State {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("State").finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct XWaylandState {
|
||||
pub enabled: Cell<bool>,
|
||||
pub handler: RefCell<Option<SpawnedFuture<()>>>,
|
||||
|
|
@ -379,4 +386,12 @@ impl State {
|
|||
}
|
||||
serial as _
|
||||
}
|
||||
|
||||
pub fn damage(&self) {
|
||||
for connector in self.connectors.lock().values() {
|
||||
if connector.connected.get() {
|
||||
connector.connector.damage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue