From 639961b1d4e0420fa60f8c91776c11598b2035d9 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 5 Jun 2024 20:00:34 +0200 Subject: [PATCH 1/2] tree: activate nested container when moving toplevel into it --- src/tree/container.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tree/container.rs b/src/tree/container.rs index ed405754..7396c6d5 100644 --- a/src/tree/container.rs +++ b/src/tree/container.rs @@ -931,6 +931,11 @@ impl ContainerNode { if let Some(neighbor) = neighbor { if let Some(cn) = neighbor.node.clone().node_into_container() { if cn.cnode_accepts_child(child.tl_as_node()) { + if let Some(mc) = self.mono_child.get() { + if mc.node.node_id() == child.node_id() { + self.activate_child2(&neighbor, true); + } + } self.cnode_remove_child2(child.tl_as_node(), true); cn.insert_child(child, direction); return; From c27e90b4e7743f8172cf9dce3fcd67239e9a6e89 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 5 Jun 2024 20:04:13 +0200 Subject: [PATCH 2/2] all: fix clippy lints --- src/theme.rs | 2 ++ src/video/gbm.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/theme.rs b/src/theme.rs index 1fdda2db..6089adca 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -80,6 +80,7 @@ impl Color { } } + #[cfg_attr(not(feature = "it"), allow(dead_code))] pub fn from_rgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Self { Self { r: to_f32(r), @@ -137,6 +138,7 @@ impl Color { ] } + #[cfg_attr(not(feature = "it"), allow(dead_code))] pub fn and_then(self, other: &Color) -> Color { Color { r: self.r * (1.0 - other.a) + other.r, diff --git a/src/video/gbm.rs b/src/video/gbm.rs index 3f34b808..8cf8cbb9 100644 --- a/src/video/gbm.rs +++ b/src/video/gbm.rs @@ -156,6 +156,7 @@ impl GbmBoMap { &*self.data } + #[cfg_attr(not(feature = "it"), allow(dead_code))] pub fn data_ptr(&self) -> *mut u8 { self.data as _ } @@ -306,6 +307,7 @@ impl GbmBo { self.map2(GBM_BO_TRANSFER_READ) } + #[cfg_attr(not(feature = "it"), allow(dead_code))] pub fn map_write(self: &Rc) -> Result { self.map2(GBM_BO_TRANSFER_READ_WRITE) }