desktop-shell: Activate shell surface when client requests fullscreen

When a toplevel xdg surface is changing from non-fullscreen to fullscreen upon a
client request, activate its corresponding shell surface.

This will let us use the activation mechanism to enforce the enabling of
pointer confinement.

Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com>
This commit is contained in:
Sergio Gómez 2023-05-02 17:55:45 -05:00 committed by Marius Vlad
parent e93da8fe3d
commit 7828712684

View File

@ -2454,7 +2454,12 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface,
weston_view_update_transform(shsurf->view); weston_view_update_transform(shsurf->view);
if (shsurf->state.fullscreen) { if (shsurf->state.fullscreen) {
shell_configure_fullscreen(shsurf); struct weston_seat *seat;
wl_list_for_each(seat, &surface->compositor->seat_list,link) {
activate(shell, shsurf->view, seat,
WESTON_ACTIVATE_FLAG_CONFIGURE);
}
} else if (shsurf->state.maximized) { } else if (shsurf->state.maximized) {
set_maximized_position(shell, shsurf); set_maximized_position(shell, shsurf);
surface->output = shsurf->output; surface->output = shsurf->output;