Skip to content

Commit

Permalink
Merge pull request #644 from JakeStanger/fix/minor-changes
Browse files Browse the repository at this point in the history
Fix/minor changes
  • Loading branch information
JakeStanger committed Jun 20, 2024
2 parents 4af2c32 + 51df2b7 commit a9d728f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ wayland-protocols-wlr = { version = "0.2.0", features = ["client"] }
smithay-client-toolkit = { version = "0.18.1", default-features = false, features = [
"calloop",
] }
universal-config = { version = "0.5.0", default_features = false }
universal-config = { version = "0.5.0", default-features = false }
ctrlc = "3.4.2"
cfg-if = "1.0.0"

Expand All @@ -119,7 +119,7 @@ clap = { version = "4.5.7", optional = true, features = ["derive"] }
serde_json = { version = "1.0.117", optional = true }

# http
reqwest = { version = "0.12.4", default_features = false, features = ["default-tls", "http2"], optional = true }
reqwest = { version = "0.12.4", default-features = false, features = ["default-tls", "http2"], optional = true }

# cairo
lua-src = { version = "546.0.2", optional = true }
Expand All @@ -130,7 +130,7 @@ cairo-rs = { version = "0.18.5", optional = true, features = ["png"] }
nix = { version = "0.29.0", optional = true, features = ["event", "fs"] }

# clock
chrono = { version = "0.4.38", optional = true, default_features = false, features = ["clock", "unstable-locales"] }
chrono = { version = "0.4.38", optional = true, default-features = false, features = ["clock", "unstable-locales"] }

# music
mpd-utils = { version = "0.2.1", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions src/clients/swaync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ pub struct Event {
pub count: u32,
pub dnd: bool,
pub cc_open: bool,
pub inhibited: bool,
// pub inhibited: bool,
}

type GetSubscribeData = (bool, bool, u32, bool);

/// Converts the data returned from
/// `get_subscribe_data` into an event for convenience.
impl From<GetSubscribeData> for Event {
fn from((dnd, cc_open, count, inhibited): (bool, bool, u32, bool)) -> Self {
fn from((dnd, cc_open, count, _inhibited): (bool, bool, u32, bool)) -> Self {
Self {
count,
dnd,
cc_open,
inhibited,
// inhibited,
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/clients/wayland/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -305,6 +306,8 @@ impl Environment {
"{:?}",
Report::new(err).wrap_err("Failed to dispatch pending wayland events")
);

exit(ExitCode::WaylandDispatchError as i32)
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit a9d728f

Please sign in to comment.