diff options
Diffstat (limited to 'src/conn_info/mod.rs')
-rw-r--r-- | src/conn_info/mod.rs | 8 |
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`] |