1
0
Fork 0
forked from wry/wry

autocommit 2022-04-18 14:14:25 CEST

This commit is contained in:
Julian Orth 2022-04-18 14:14:25 +02:00
parent 085ca95835
commit 54cf01f745
20 changed files with 155 additions and 109 deletions

View file

@ -30,11 +30,12 @@ use {
utils::{
buffd::{MsgParser, MsgParserError},
clonecell::CloneCell,
copyhashmap::CopyHashMap,
linkedlist::LinkedList,
numcell::NumCell,
smallmap::SmallMap,
},
wire::{wl_surface::*, WlOutputId, WlSurfaceId},
wire::{wl_surface::*, WlOutputId, WlSurfaceId, ZwpIdleInhibitorV1Id},
xkbcommon::ModifierState,
},
ahash::AHashMap,
@ -49,8 +50,6 @@ use {
thiserror::Error,
zwp_idle_inhibitor_v1::ZwpIdleInhibitorV1,
};
use crate::utils::copyhashmap::CopyHashMap;
use crate::wire::ZwpIdleInhibitorV1Id;
#[allow(dead_code)]
const INVALID_SCALE: u32 = 0;
@ -691,6 +690,10 @@ impl SizedNode for WlSurface {
self.visible.get()
}
fn parent(&self) -> Option<Rc<dyn Node>> {
self.toplevel.get().map(|tl| tl.into_node())
}
fn set_visible(&self, visible: bool) {
self.visible.set(visible);
for inhibitor in self.idle_inhibitors.lock().values() {