From 1cc998eb192de3f3e4233ccca315916fb80ce409 Mon Sep 17 00:00:00 2001 From: Ilia Bozhinov Date: Thu, 23 Nov 2023 16:33:10 +0100 Subject: [PATCH] ipc-rules: emit last-focus-timestamp for list_views --- plugins/single_plugins/ipc-rules.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/single_plugins/ipc-rules.cpp b/plugins/single_plugins/ipc-rules.cpp index e432a3e50..c4f105d0a 100644 --- a/plugins/single_plugins/ipc-rules.cpp +++ b/plugins/single_plugins/ipc-rules.cpp @@ -12,6 +12,7 @@ #include "plugins/ipc/ipc-method-repository.hpp" #include "wayfire/core.hpp" #include "wayfire/object.hpp" +#include "wayfire/plugins/common/util.hpp" #include "wayfire/unstable/wlr-surface-node.hpp" #include "wayfire/plugins/common/shared-core-data.hpp" #include "wayfire/signal-definitions.hpp" @@ -166,6 +167,7 @@ class ipc_rules_t : public wf::plugin_interface_t, public wf::per_output_tracker v["base-geometry"] = wf::ipc::geometry_to_json(get_view_base_geometry(view)); v["bbox"] = wf::ipc::geometry_to_json(view->get_bounding_box()); v["output"] = view->get_output() ? view->get_output()->to_string() : "null"; + v["last-focus-timestamp"] = wf::get_focus_timestamp(view); v["state"] = {}; v["state"]["mapped"] = view->is_mapped();