From d19810eba8959f052d91fd6609cef6adf36b3951 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Tue, 26 Dec 2023 22:26:02 -0800 Subject: xdg-activation: distinguish activation and urgency requests Check if the app that requested a token has provided a valid input serial and a focused surface. Downgrade activation request to urgency otherwise. This is mostly in line with what other Wayland compositors decided to do, and offers a better security than the original logic. --- include/sway/desktop/launcher.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sway/desktop') diff --git a/include/sway/desktop/launcher.h b/include/sway/desktop/launcher.h index ad465a9e..412068a9 100644 --- a/include/sway/desktop/launcher.h +++ b/include/sway/desktop/launcher.h @@ -14,6 +14,7 @@ struct launcher_ctx { struct wl_listener seat_destroy; bool activated; + bool had_focused_surface; struct sway_node *node; struct wl_listener node_destroy; -- cgit v1.2.3