Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdg-activation: launcher tokens are activation requests #8017

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions sway/xdg_activation_v1.c
Expand Up @@ -38,14 +38,14 @@ void xdg_activation_v1_handle_request_activate(struct wl_listener *listener,
}

// This is an activation request. If this context is internal we have ctx->seat.
struct sway_seat *seat = ctx->seat;
if (!seat) {
// Otherwise, use the seat indicated by the launcher client in set_serial
seat = ctx->token->seat ? ctx->token->seat->data : NULL;
if (ctx->seat) {
view_request_activate(view, ctx->seat);
return;
}

if (seat && ctx->had_focused_surface) {
view_request_activate(view, seat);
// Otherwise, activate if passed from another focused client
if (ctx->token->seat && ctx->had_focused_surface) {
view_request_activate(view, ctx->token->seat->data);
} else {
// The token is valid, but cannot be used to activate a window
view_request_urgent(view);
Expand Down