aboutsummaryrefslogtreecommitdiffstats
path: root/sway/xdg_activation_v1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/xdg_activation_v1.c')
-rw-r--r--sway/xdg_activation_v1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/xdg_activation_v1.c b/sway/xdg_activation_v1.c
index 399d81cd..3a035972 100644
--- a/sway/xdg_activation_v1.c
+++ b/sway/xdg_activation_v1.c
@@ -43,8 +43,11 @@ void xdg_activation_v1_handle_request_activate(struct wl_listener *listener,
43 seat = ctx->token->seat ? ctx->token->seat->data : NULL; 43 seat = ctx->token->seat ? ctx->token->seat->data : NULL;
44 } 44 }
45 45
46 if (seat) { 46 if (seat && ctx->had_focused_surface) {
47 view_request_activate(view, seat); 47 view_request_activate(view, seat);
48 } else {
49 // The token is valid, but cannot be used to activate a window
50 view_request_urgent(view);
48 } 51 }
49} 52}
50 53