summaryrefslogtreecommitdiff
path: root/src/conn_info/mod.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-30 15:48:34 +0100
committertcmal <me@aria.rip>2024-08-30 16:20:29 +0100
commitb5601a6eb3a8d0603bb837a847701d3d49f984c3 (patch)
tree3004b27ed9b710b7cd8d4569e852f072db7814e8 /src/conn_info/mod.rs
parent12c930d9118941997336deb9ef6c676aa35b1cd9 (diff)
Add bind for killing clients
Diffstat (limited to 'src/conn_info/mod.rs')
-rw-r--r--src/conn_info/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/conn_info/mod.rs b/src/conn_info/mod.rs
index f85cdc0..42f3955 100644
--- a/src/conn_info/mod.rs
+++ b/src/conn_info/mod.rs
@@ -180,7 +180,7 @@ impl<'a> Connection<'a> {
}
/// Send event to window `w`, if the event is supported.
- pub fn send_event(&self, window: Window, event: Atom) {
+ pub fn send_event(&self, window: Window, event: Atom) -> bool {
let Ok(protocols) = self.wait_for_reply(self.send_request(&GetProperty {
delete: false,
window,
@@ -189,11 +189,11 @@ impl<'a> Connection<'a> {
long_offset: 0,
long_length: 100_000,
})) else {
- return;
+ return false;
};
if protocols.r#type() != x::ATOM_ATOM || protocols.format() != 32 {
- return;
+ return false;
}
let supported = protocols
@@ -213,6 +213,8 @@ impl<'a> Connection<'a> {
),
});
}
+
+ supported
}
/// Delegate for [`RawConnection::send_request`]