feat: support multiple fullscreen windows per workspace

This commit is contained in:
Hojjat Abdollahi 2026-06-02 09:48:33 -06:00 committed by GitHub
parent 9f28a764a7
commit 28ef6bdbc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 381 additions and 308 deletions

View file

@ -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

View file

@ -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)

View file

@ -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)
}

View file

@ -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())
})
}) {