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
22
src/state.rs
22
src/state.rs
|
|
@ -996,8 +996,8 @@ impl Common {
|
|||
|
||||
// normal windows
|
||||
for space in shell.workspaces.spaces() {
|
||||
if let Some(window) = space.get_fullscreen() {
|
||||
window.with_surfaces(processor);
|
||||
if let Some(fs) = space.get_fullscreen(shell.seats.last_active()) {
|
||||
fs.surface.with_surfaces(processor);
|
||||
}
|
||||
space.mapped().for_each(|mapped| {
|
||||
for (window, _) in mapped.windows() {
|
||||
|
|
@ -1162,15 +1162,16 @@ impl Common {
|
|||
});
|
||||
|
||||
if let Some(active) = shell.active_space(output) {
|
||||
if let Some(window) = active.get_fullscreen()
|
||||
&& let Some(feedback) = window
|
||||
if let Some(fs) = active.get_fullscreen(shell.seats.last_active())
|
||||
&& let Some(feedback) = fs
|
||||
.surface
|
||||
.wl_surface()
|
||||
.and_then(|wl_surface| {
|
||||
advertised_node_for_surface(&wl_surface, &self.display_handle)
|
||||
})
|
||||
.and_then(&mut dmabuf_feedback)
|
||||
{
|
||||
window.send_dmabuf_feedback(
|
||||
fs.surface.send_dmabuf_feedback(
|
||||
output,
|
||||
&feedback,
|
||||
render_element_states,
|
||||
|
|
@ -1356,8 +1357,9 @@ impl Common {
|
|||
});
|
||||
|
||||
if let Some(active) = shell.active_space(output) {
|
||||
if let Some(window) = active.get_fullscreen() {
|
||||
window.send_frame(output, time, throttle(window), should_send);
|
||||
if let Some(fs) = active.get_fullscreen(shell.seats.last_active()) {
|
||||
fs.surface
|
||||
.send_frame(output, time, throttle(&fs.surface), should_send);
|
||||
}
|
||||
active.mapped().for_each(|mapped| {
|
||||
for (window, _) in mapped.windows() {
|
||||
|
|
@ -1377,9 +1379,9 @@ impl Common {
|
|||
.spaces_for_output(output)
|
||||
.filter(|w| w.handle != active.handle)
|
||||
{
|
||||
if let Some(window) = space.get_fullscreen() {
|
||||
let throttle = min(throttle(space), throttle(window));
|
||||
window.send_frame(output, time, throttle, |_, _| None);
|
||||
if let Some(fs) = space.get_fullscreen(shell.seats.last_active()) {
|
||||
let throttle = min(throttle(space), throttle(&fs.surface));
|
||||
fs.surface.send_frame(output, time, throttle, |_, _| None);
|
||||
}
|
||||
space.mapped().for_each(|mapped| {
|
||||
for (window, _) in mapped.windows() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue