aboutsummaryrefslogtreecommitdiff
path: root/src/ipc/server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc/server.rs')
-rw-r--r--src/ipc/server.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ipc/server.rs b/src/ipc/server.rs
index ade57de1..95176ce3 100644
--- a/src/ipc/server.rs
+++ b/src/ipc/server.rs
@@ -18,7 +18,7 @@ use niri_config::OutputName;
use niri_ipc::state::{EventStreamState, EventStreamStatePart as _};
use niri_ipc::{
Action, Event, KeyboardLayouts, OutputConfigChanged, Overview, Reply, Request, Response,
- WindowLayout, Workspace,
+ Timestamp, WindowLayout, Workspace,
};
use smithay::desktop::layer_map_for_output;
use smithay::input::pointer::{
@@ -514,6 +514,7 @@ fn make_ipc_window(
is_floating: mapped.is_floating(),
is_urgent: mapped.is_urgent(),
layout,
+ focus_timestamp: mapped.get_focus_timestamp().map(Timestamp::from),
})
}
@@ -725,6 +726,14 @@ impl State {
events.push(Event::WindowFocusChanged { id: Some(id) });
}
+ let focus_timestamp = mapped.get_focus_timestamp().map(Timestamp::from);
+ if focus_timestamp != ipc_win.focus_timestamp {
+ events.push(Event::WindowFocusTimestampChanged {
+ id,
+ focus_timestamp,
+ });
+ }
+
let urgent = mapped.is_urgent();
if urgent != ipc_win.is_urgent {
events.push(Event::WindowUrgencyChanged { id, urgent })