diff options
author | Simon Ser <contact@emersion.fr> | 2021-06-01 11:29:10 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-06-02 11:18:25 +0200 |
commit | 76f51a949f55c865e3ea1c90965afd4d835baad9 (patch) | |
tree | 36e687f8fa8373d3726c4befa39671ec03493f4c /include/wlr | |
parent | 8ff435831f5c79e24ac42b35b141e1f79eb66bc8 (diff) |
xdg-activation-v1: add token timeout
There isn't always a good time to prune old tokens. Compositors
which only implement a "give focus on activation" logic can prune
tokens on focus change. However other compositors might want to
implement other semantics, e.g. "mark urgent on activation". In this
case a focus change shouldn't invalidate other tokens.
Additionally, some tokens aren't necessarily tied to a seat.
To avoid ending up with an ever-growing list of tokens, add a timeout.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_xdg_activation_v1.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_xdg_activation_v1.h b/include/wlr/types/wlr_xdg_activation_v1.h index 121e66a1..04558a08 100644 --- a/include/wlr/types/wlr_xdg_activation_v1.h +++ b/include/wlr/types/wlr_xdg_activation_v1.h @@ -26,12 +26,14 @@ struct wlr_xdg_activation_token_v1 { char *token; struct wl_resource *resource; // can be NULL + struct wl_event_source *timeout; // can be NULL struct wl_listener seat_destroy; struct wl_listener surface_destroy; }; struct wlr_xdg_activation_v1 { + uint32_t token_timeout_msec; // token timeout in milliseconds (0 to disable) struct wl_list tokens; // wlr_xdg_activation_token_v1.link |