diff --git a/src/clients/wayland/mod.rs b/src/clients/wayland/mod.rs index 8c7fcb8..ca7c367 100644 --- a/src/clients/wayland/mod.rs +++ b/src/clients/wayland/mod.rs @@ -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) } } } diff --git a/src/error.rs b/src/error.rs index 66f30cd..a55fa12 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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";