mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-25 21:58:31 +01:00
xdg-activation: launcher tokens are activation requests
If the launched client decides to pass it's token along as an activation request, allow that. This will make the behavior match tokens provided by an external launcher client.
This commit is contained in:
parent
3d00552035
commit
28fd73589d
1 changed files with 6 additions and 6 deletions
|
@ -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.
|
// This is an activation request. If this context is internal we have ctx->seat.
|
||||||
struct sway_seat *seat = ctx->seat;
|
if (ctx->seat) {
|
||||||
if (!seat) {
|
view_request_activate(view, ctx->seat);
|
||||||
// Otherwise, use the seat indicated by the launcher client in set_serial
|
return;
|
||||||
seat = ctx->token->seat ? ctx->token->seat->data : NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seat && ctx->had_focused_surface) {
|
// Otherwise, activate if passed from another focused client
|
||||||
view_request_activate(view, seat);
|
if (ctx->token->seat && ctx->had_focused_surface) {
|
||||||
|
view_request_activate(view, ctx->token->seat->data);
|
||||||
} else {
|
} else {
|
||||||
// The token is valid, but cannot be used to activate a window
|
// The token is valid, but cannot be used to activate a window
|
||||||
view_request_urgent(view);
|
view_request_urgent(view);
|
||||||
|
|
Loading…
Reference in a new issue