Merge pull request #213 from mahkoh/jorth/activate-nested-container
tree: activate nested container when moving toplevel into it
This commit is contained in:
commit
040ce3cfb3
3 changed files with 9 additions and 0 deletions
|
|
@ -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 {
|
pub fn from_rgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Self {
|
||||||
Self {
|
Self {
|
||||||
r: to_f32(r),
|
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 {
|
pub fn and_then(self, other: &Color) -> Color {
|
||||||
Color {
|
Color {
|
||||||
r: self.r * (1.0 - other.a) + other.r,
|
r: self.r * (1.0 - other.a) + other.r,
|
||||||
|
|
|
||||||
|
|
@ -931,6 +931,11 @@ impl ContainerNode {
|
||||||
if let Some(neighbor) = neighbor {
|
if let Some(neighbor) = neighbor {
|
||||||
if let Some(cn) = neighbor.node.clone().node_into_container() {
|
if let Some(cn) = neighbor.node.clone().node_into_container() {
|
||||||
if cn.cnode_accepts_child(child.tl_as_node()) {
|
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);
|
self.cnode_remove_child2(child.tl_as_node(), true);
|
||||||
cn.insert_child(child, direction);
|
cn.insert_child(child, direction);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@ impl GbmBoMap {
|
||||||
&*self.data
|
&*self.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
||||||
pub fn data_ptr(&self) -> *mut u8 {
|
pub fn data_ptr(&self) -> *mut u8 {
|
||||||
self.data as _
|
self.data as _
|
||||||
}
|
}
|
||||||
|
|
@ -306,6 +307,7 @@ impl GbmBo {
|
||||||
self.map2(GBM_BO_TRANSFER_READ)
|
self.map2(GBM_BO_TRANSFER_READ)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
||||||
pub fn map_write(self: &Rc<Self>) -> Result<GbmBoMap, GbmError> {
|
pub fn map_write(self: &Rc<Self>) -> Result<GbmBoMap, GbmError> {
|
||||||
self.map2(GBM_BO_TRANSFER_READ_WRITE)
|
self.map2(GBM_BO_TRANSFER_READ_WRITE)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue