Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix window properties #65

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ pub fn build_window_properties(
"window_role" => Some(reply::WindowProperty::WindowRole),
"title" => Some(reply::WindowProperty::Title),
"transient_for" => Some(reply::WindowProperty::TransientFor),
"machine" => Some(reply::WindowProperty::Machine),
other => {
warn!(target: "i3ipc", "Unknown WindowProperty {}", other);
return None;
None
}
};
if let Some(window_property) = window_property {
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Error for EstablishError {

impl fmt::Display for EstablishError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
write!(f, "{}", self.to_string())
}
}

Expand Down Expand Up @@ -101,7 +101,7 @@ impl Error for MessageError {

impl fmt::Display for MessageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
write!(f, "{}", self.to_string())
}
}

Expand Down Expand Up @@ -132,7 +132,7 @@ fn get_socket_path() -> io::Result<String> {
}

trait I3Funcs {
fn send_i3_message(&mut self, u32, &str) -> io::Result<()>;
fn send_i3_message(&mut self, message_type: u32, payload: &str) -> io::Result<()>;
fn receive_i3_message(&mut self) -> io::Result<(u32, String)>;
fn send_receive_i3_message<T: serde::de::DeserializeOwned>(
&mut self,
Expand Down
1 change: 1 addition & 0 deletions src/reply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ pub enum WindowProperty {
Class,
WindowRole,
TransientFor,
Machine,
}

#[derive(Eq, PartialEq, Debug, Clone)]
Expand Down