feat: support multiple fullscreen windows per workspace
This commit is contained in:
parent
9f28a764a7
commit
28ef6bdbc8
12 changed files with 381 additions and 308 deletions
|
|
@ -51,9 +51,11 @@ impl DmabufHandler for State {
|
|||
let is_fullscreen = shell
|
||||
.workspaces
|
||||
.space_for_handle(&handle)?
|
||||
.fullscreen
|
||||
.as_ref()
|
||||
.is_some_and(|f| f.surface.has_surface(surface, WindowSurfaceType::all()));
|
||||
.fullscreen_surfaces
|
||||
.iter()
|
||||
.any(|f| {
|
||||
f.ended_at.is_none() && f.surface.has_surface(surface, WindowSurfaceType::all())
|
||||
});
|
||||
|
||||
let node = kms
|
||||
.drm_devices
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ impl ToplevelManagementHandler for State {
|
|||
.spaces_for_output(output)
|
||||
.enumerate()
|
||||
.find(|(_, w)| {
|
||||
w.get_fullscreen().is_some_and(|f| f == window)
|
||||
w.get_fullscreen_surfaces().any(|f| &f.surface == window)
|
||||
|| w.mapped()
|
||||
.flat_map(|m| m.windows().map(|(s, _)| s))
|
||||
.any(|w| &w == window)
|
||||
|
|
|
|||
|
|
@ -219,8 +219,8 @@ impl State {
|
|||
.workspaces
|
||||
.space_for_handle(&workspace)
|
||||
.unwrap()
|
||||
.get_fullscreen()
|
||||
.cloned()
|
||||
.get_fullscreen(&seat)
|
||||
.map(|f| f.surface.clone())
|
||||
.map(KeyboardFocusTarget::Fullscreen)
|
||||
else {
|
||||
return;
|
||||
|
|
@ -232,8 +232,8 @@ impl State {
|
|||
if let Some(surface) = shell
|
||||
.workspaces
|
||||
.space_for_handle(&workspace)
|
||||
.and_then(|w| w.get_fullscreen())
|
||||
.cloned()
|
||||
.and_then(|w| w.get_fullscreen(&seat))
|
||||
.map(|f| f.surface.clone())
|
||||
{
|
||||
shell.append_focus_stack(surface, &seat)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ impl Shell {
|
|||
unconstrain_xdg_popup(surface, window_loc, output.geometry());
|
||||
}
|
||||
} else if let Some(output) = self.workspaces.spaces().find_map(|w| {
|
||||
w.fullscreen.as_ref().and_then(|f| {
|
||||
w.fullscreen_surfaces.iter().find_map(|f| {
|
||||
(f.surface.wl_surface().as_deref() == Some(&parent)).then_some(w.output())
|
||||
})
|
||||
}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue