1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 11:24:24 +02:00

fix(wayland): exit on event dispatch error

This should hopefully resolve log spamming issues.
This commit is contained in:
Jake Stanger 2024-06-20 20:58:41 +01:00
parent 167f23dcbd
commit 7e04e30171
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 5 additions and 1 deletions

View file

@ -2,8 +2,9 @@ mod macros;
mod wl_output;
mod wl_seat;
use crate::error::ERR_CHANNEL_RECV;
use crate::error::{ExitCode, ERR_CHANNEL_RECV};
use crate::{arc_mut, lock, register_client, send, spawn, spawn_blocking};
use std::process::exit;
use std::sync::{Arc, Mutex};
use calloop_channel::Event::Msg;
@ -305,6 +306,8 @@ impl Environment {
"{:?}",
Report::new(err).wrap_err("Failed to dispatch pending wayland events")
);
exit(ExitCode::WaylandDispatchError as i32)
}
}
}

View file

@ -3,6 +3,7 @@ pub enum ExitCode {
GtkDisplay = 1,
CreateBars = 2,
IpcResponseError = 3,
WaylandDispatchError = 4,
}
pub const ERR_MUTEX_LOCK: &str = "Failed to get lock on Mutex";