diff --git a/protocols.md b/protocols.md index b873e16e..3b321f16 100644 --- a/protocols.md +++ b/protocols.md @@ -42,6 +42,5 @@ - xdg-shell - xdg_positioner - set_reactive - - xdg_toplevel - - set_fullscreen - - unset_fullscreen + - xdg_popup + - grab diff --git a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs index e058bd81..bd9b9449 100644 --- a/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs +++ b/src/ifs/wl_surface/xdg_surface/xdg_toplevel.rs @@ -299,6 +299,7 @@ impl XdgToplevel { ) -> Result<(), SetFullscreenError> { let client = &self.xdg.surface.client; let req: SetFullscreen = client.parse(self.deref(), parser)?; + self.states.borrow_mut().insert(STATE_FULLSCREEN); 'set_fullscreen: { let output = if req.output.is_some() { match client.lookup(req.output)?.global.node.get() { @@ -636,7 +637,7 @@ impl XdgSurfaceExt for XdgToplevel { impl SizedFullscreenNode for XdgToplevel { fn on_set_fullscreen(&self, _workspace: &Rc) { - self.states.borrow_mut().insert(STATE_FULLSCREEN); + // nothing } fn on_unset_fullscreen(&self) { diff --git a/src/ifs/wl_surface/zwp_idle_inhibitor_v1.rs b/src/ifs/wl_surface/zwp_idle_inhibitor_v1.rs index c5caae93..71063973 100644 --- a/src/ifs/wl_surface/zwp_idle_inhibitor_v1.rs +++ b/src/ifs/wl_surface/zwp_idle_inhibitor_v1.rs @@ -23,7 +23,6 @@ pub struct ZwpIdleInhibitorV1 { impl ZwpIdleInhibitorV1 { fn destroy(&self, parser: MsgParser<'_, '_>) -> Result<(), ZwpIdleInhibitorV1Error> { - log::info!("destroy {}", self.id); let _req: Destroy = self.client.parse(self, parser)?; self.client.remove_obj(self)?; if self.surface.idle_inhibitors.remove(&self.id).is_some() { diff --git a/src/ifs/zwp_idle_inhibit_manager_v1.rs b/src/ifs/zwp_idle_inhibit_manager_v1.rs index 333d52de..ee7dd835 100644 --- a/src/ifs/zwp_idle_inhibit_manager_v1.rs +++ b/src/ifs/zwp_idle_inhibit_manager_v1.rs @@ -80,7 +80,6 @@ impl ZwpIdleInhibitManagerV1 { ) -> Result<(), ZwpIdleInhibitManagerV1Error> { let req: CreateInhibitor = self.client.parse(self, parser)?; let surface = self.client.lookup(req.surface)?; - log::info!("create {}", req.id); let inhibit = Rc::new(ZwpIdleInhibitorV1 { id: req.id, inhibit_id: self.client.state.idle_inhibitor_ids.next(), diff --git a/src/tree.rs b/src/tree.rs index fa8189b4..5cafc7fc 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -73,6 +73,12 @@ pub enum FindTreeResult { Other, } +impl FindTreeResult { + pub fn accepts_input(self) -> bool { + self == Self::AcceptsInput + } +} + pub trait SizedNode: Sized + 'static { fn id(&self) -> NodeId; fn seat_state(&self) -> &NodeSeatState; diff --git a/src/tree/output.rs b/src/tree/output.rs index 3b8d7075..45ded886 100644 --- a/src/tree/output.rs +++ b/src/tree/output.rs @@ -342,15 +342,14 @@ impl SizedNode for OutputNode { return fs.as_node().node_find_tree_at(x, y, tree); } } - let (x_abs, y_abs) = self.global.pos.get().translate_inv(x, y); { - if self.find_layer_surface_at(x_abs, y_abs, &[OVERLAY, TOP], tree) - == FindTreeResult::AcceptsInput - { - return FindTreeResult::AcceptsInput; + let res = self.find_layer_surface_at(x, y, &[OVERLAY, TOP], tree); + if res.accepts_input() { + return res; } } { + let (x_abs, y_abs) = self.global.pos.get().translate_inv(x, y); for stacked in self.state.root.stacked.rev_iter() { let ext = stacked.node_absolute_position(); if stacked.node_absolute_position_constrains_input() && !ext.contains(x_abs, y_abs) diff --git a/src/xwayland/xwm.rs b/src/xwayland/xwm.rs index c1c7e008..e887d405 100644 --- a/src/xwayland/xwm.rs +++ b/src/xwayland/xwm.rs @@ -417,8 +417,13 @@ impl Wm { } async fn set_fullscreen(&self, data: &Rc, fullscreen: bool) { - data.info.fullscreen.set(fullscreen); - self.set_net_wm_state(data).await; + if false { + // NOTE: We do not want to inform the program if the user changes the fullscreen + // status of the window. Programs usually provide an in-program way to enter/exit + // fullscreen mode. + data.info.fullscreen.set(fullscreen); + self.set_net_wm_state(data).await; + } } async fn send_wm_message(&self, window: &Rc, event_mask: u32, data: &[u32]) { diff --git a/todo.md b/todo.md index da9a8a72..8eb9f0aa 100644 --- a/todo.md +++ b/todo.md @@ -4,6 +4,7 @@ - presentation time - viewporter - session lock +- stacked restacking # done