summaryrefslogtreecommitdiff
path: root/src/wm_info_provider
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2024-10-13 10:44:31 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2024-10-13 10:44:31 +0300
commit7ff4f0727ef05b63be4b91290d0d4b8f3f3854b4 (patch)
tree933ad1ae8379279efd0ffdd298fb06566e1adb6a /src/wm_info_provider
parent2febf2044d96cef4a8e55bcff8da678b31ef98f0 (diff)
downloadi3bar-mango-7ff4f0727ef05b63be4b91290d0d4b8f3f3854b4.tar.gz
fix error handling in wm_info_provider
Diffstat (limited to 'src/wm_info_provider')
-rw-r--r--src/wm_info_provider/hyprland.rs2
-rw-r--r--src/wm_info_provider/river.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/wm_info_provider/hyprland.rs b/src/wm_info_provider/hyprland.rs
index 0d7d4ec..19a259a 100644
--- a/src/wm_info_provider/hyprland.rs
+++ b/src/wm_info_provider/hyprland.rs
@@ -39,7 +39,7 @@ impl WmInfoProvider for HyprlandInfoProvider {
match hyprland_cb(ctx.conn, ctx.state) {
Ok(()) => Ok(event_loop::Action::Keep),
Err(e) => {
- ctx.state.set_error(ctx.conn, e);
+ ctx.state.set_error(ctx.conn, "hyprland", e);
Ok(event_loop::Action::Unregister)
}
}
diff --git a/src/wm_info_provider/river.rs b/src/wm_info_provider/river.rs
index 6b3c8b0..61b7e2b 100644
--- a/src/wm_info_provider/river.rs
+++ b/src/wm_info_provider/river.rs
@@ -211,6 +211,7 @@ fn seat_status_cb(ctx: EventCtx<State, ZriverSeatStatusV1>) {
fn river_command_cb(ctx: EventCtx<State, ZriverCommandCallbackV1>) {
if let zriver_command_callback_v1::Event::Failure(msg) = ctx.event {
- ctx.state.set_error(ctx.conn, msg.to_string_lossy())
+ ctx.state
+ .set_error(ctx.conn, "river", msg.to_string_lossy())
}
}