desktop-shell: Avoid using maximized size in fullscreen state

The fullscreen should take precedence if the client requests both
window states at the same time.

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
Jeffy Chen 2024-02-02 11:24:18 +08:00
parent 18eebe8af3
commit 5dbf96fb6c
1 changed files with 3 additions and 4 deletions

View File

@ -272,11 +272,10 @@ set_shsurf_size_maximized_or_fullscreen(struct shell_surface *shsurf,
width = shsurf->output->width;
height = shsurf->output->height;
}
}
/* take the panels into considerations */
if (max_requested)
} else if (max_requested) {
/* take the panels into considerations */
get_maximized_size(shsurf, &width, &height);
}
/* (0, 0) means we're back from one of the maximized/fullcreen states */
weston_desktop_surface_set_size(shsurf->desktop_surface, width, height);