mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
fix(wayland): exit on event dispatch error
This should hopefully resolve log spamming issues.
This commit is contained in:
parent
167f23dcbd
commit
7e04e30171
2 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue