diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index b49fa27ee..ff3a3513a 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2362,7 +2362,9 @@ map(struct desktop_shell *shell, struct shell_surface *shsurf) if (!shell->locked) { wl_list_for_each(seat, &compositor->seat_list, link) activate(shell, shsurf->view, seat, - WESTON_ACTIVATE_FLAG_CONFIGURE); + WESTON_ACTIVATE_FLAG_CONFIGURE | + (shsurf->state.fullscreen ? + WESTON_ACTIVATE_FLAG_FULLSCREEN : 0)); } if (!shsurf->state.fullscreen && !shsurf->state.maximized) { @@ -2458,7 +2460,8 @@ desktop_surface_committed(struct weston_desktop_surface *desktop_surface, wl_list_for_each(seat, &surface->compositor->seat_list,link) { activate(shell, shsurf->view, seat, - WESTON_ACTIVATE_FLAG_CONFIGURE); + WESTON_ACTIVATE_FLAG_CONFIGURE | + WESTON_ACTIVATE_FLAG_FULLSCREEN); } } else if (shsurf->state.maximized) { set_maximized_position(shell, shsurf); diff --git a/libweston/input.c b/libweston/input.c index 610d481c3..164dbf366 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -4838,8 +4838,17 @@ pointer_constraint_surface_activate(struct wl_listener *listener, void *data) get_pointer_constraint_for_pointer(focus, pointer) == constraint; if (is_constraint_surface && - !is_pointer_constraint_enabled(constraint)) - maybe_enable_pointer_constraint(constraint); + !is_pointer_constraint_enabled(constraint)) { + if (activation->flags & WESTON_ACTIVATE_FLAG_FULLSCREEN) { + weston_view_update_transform(activation->view); + weston_pointer_set_focus(pointer, activation->view); + enable_pointer_constraint(constraint, activation->view); + maybe_warp_confined_pointer(constraint); + } + else { + maybe_enable_pointer_constraint(constraint); + } + } else if (!is_constraint_surface && is_pointer_constraint_enabled(constraint)) disable_pointer_constraint(constraint);