merge: epoch-1.10.0 d'upstream

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lionel DARNIS 2026-10-11 07:00:05 +02:00
commit 11f60acc94
25 changed files with 758 additions and 222 deletions

View file

@ -430,6 +430,10 @@ impl CosmicMapped {
}
}
pub fn is_sticky(&self) -> bool {
self.active_window().is_sticky()
}
pub fn pending_size(&self) -> Option<Size<i32, Logical>> {
match &self.element {
CosmicMappedInternal::Stack(s) => s.pending_size(),

View file

@ -255,8 +255,17 @@ impl Shell {
let workspace = if let Some(workspace) = workspace {
self.workspaces.space_for_handle_mut(&workspace.0).unwrap()
} else {
//should this be the active output or the focused output?
self.active_space_mut(&seat.focused_or_active_output())
let output = match &target {
FocusTarget::Window(mapped) => self
.workspaces
.sets
.iter()
.find(|(_, set)| set.sticky_layer.mapped().any(|m| m == mapped))
.map(|(output, _)| output.clone()),
FocusTarget::Fullscreen(_) => None,
};
self.active_space_mut(&output.unwrap_or_else(|| seat.active_output()))
.unwrap()
};

View file

@ -579,10 +579,12 @@ impl PointerGrab<State> for MenuGrab {
PointerTarget::motion(&element.iced, &self.seat, state, &new_event);
}
} else {
// Keep the root menu hovered while a submenu is open
let keep_root = usize::from(elements.len() > 1);
elements
.iter_mut()
.filter(|element| element.pointer_entered)
.skip(1)
.skip(keep_root)
.for_each(|element| {
PointerTarget::leave(
&element.iced,
@ -1020,10 +1022,11 @@ impl TabletToolGrab<State> for MenuGrab {
);
self.last_tablet_idx = Some(i);
} else {
let keep_root = usize::from(elements.len() > 1);
elements
.iter_mut()
.filter(|element| element.tablet_entered.is_some())
.skip(1)
.skip(keep_root)
.for_each(|element| {
TabletToolTarget::proximity_out(
&element.iced,

View file

@ -3271,12 +3271,34 @@ impl TilingLayout {
}
}
let (_, inner) = self.gaps();
let mut result = None;
let mut fork = None;
let mut lookup = Some(root.clone());
while let Some(node) = lookup {
let data = tree.get(&node).unwrap().data();
if data.geometry().contains(location) {
result = Some(node.clone());
if let Data::Group {
orientation,
sizes,
last_geometry,
..
} = data
{
let (pos, mut split) = match orientation {
Orientation::Vertical => (location.x, last_geometry.loc.x),
Orientation::Horizontal => (location.y, last_geometry.loc.y),
};
for (idx, size) in
sizes.iter().take(sizes.len().saturating_sub(1)).enumerate()
{
split += size;
if (pos - split).abs() <= inner / 2 {
fork = Some((node.clone(), idx));
}
}
}
}
lookup = None;
@ -3323,25 +3345,16 @@ impl TilingLayout {
)
})
}
Some((
id,
Data::Group {
Some((_, Data::Group { .. })) => {
let (id, idx) = fork?;
let Data::Group {
orientation,
last_geometry,
..
},
)) => {
let idx = tree
.children(&id)
.unwrap()
.position(|node| {
let data = node.data();
match orientation {
Orientation::Vertical => location.x < data.geometry().loc.x,
Orientation::Horizontal => location.y < data.geometry().loc.y,
}
})
.and_then(|x| x.checked_sub(1))?;
} = tree.get(&id).unwrap().data().clone()
else {
unreachable!()
};
Some((
ResizeForkTarget {
node: id.clone(),

View file

@ -516,6 +516,12 @@ impl WorkspaceSet {
}
}
fn refresh_focus_stacks(&mut self) {
for workspace in &mut self.workspaces {
workspace.refresh_focus_stack();
}
}
fn activate(
&mut self,
idx: usize,
@ -620,6 +626,7 @@ impl WorkspaceSet {
self.workspaces[self.active].refresh();
}
self.sticky_layer.refresh();
self.refresh_focus_stacks();
}
fn add_empty_workspace(&mut self, state: &mut WorkspaceUpdateGuard<State>) {

View file

@ -526,10 +526,16 @@ impl Workspace {
.mapped()
.chain(self.tiling_layer.mapped().map(|(w, _)| w))
.chain(move_mapped.iter())
.chain(
self.minimized_windows
.iter()
.flat_map(MinimizedWindow::mapped),
)
};
stack.retain(|w| match w {
FocusTarget::Fullscreen(s) => fullscreen_surfaces.contains(&s),
FocusTarget::Window(w) => mapped().any(|m| w == m),
// Sticky windows live in the `WorkspaceSet` but are shown on whichever workspace is current
FocusTarget::Window(w) => w.is_sticky() || mapped().any(|m| w == m),
});
}
}
@ -1767,13 +1773,17 @@ impl Workspace {
self.floating_layer.render(
renderer,
focused.as_ref().and_then(|target| {
if let FocusTarget::Window(mapped) = target {
Some(mapped)
} else {
None
}
}),
render_focus
.then(|| {
focused.as_ref().and_then(|target| {
if let FocusTarget::Window(mapped) = target {
Some(mapped)
} else {
None
}
})
})
.flatten(),
resize_indicator.clone(),
indicator_thickness,
alpha,