mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
Add last_focused timestamp to containers
A new field `struct timespec last_focused` is added to the `sway_container_state` struct holding a UNIX timestamp telling when this container last gained focus. This timestamp is added to the IPC `get_tree` JSON output. The rationale is that it allows users writing their own container manipulation scripts (e.g., window switchers) to sort containers by last-recently-used order.
This commit is contained in:
parent
40bdd0eecf
commit
c92ecaea6f
3 changed files with 14 additions and 0 deletions
|
|
@ -52,6 +52,7 @@ struct sway_container_state {
|
|||
|
||||
struct sway_container *focused_inactive_child;
|
||||
bool focused;
|
||||
struct timespec last_focused;
|
||||
|
||||
enum sway_container_border border;
|
||||
int border_thickness;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue