summaryrefslogtreecommitdiff
path: root/src/conn_info/mod.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-06-21 21:31:59 +0100
committertcmal <me@aria.rip>2024-06-21 21:31:59 +0100
commit28d1cbca91c35175137ec8f9a9f816f3448467b6 (patch)
tree0e0671d7bbbe2b6946383731fc8bd8189e315878 /src/conn_info/mod.rs
parenta4504f118b4ba653ca3587331ba16a9ebe72746c (diff)
fix some problems when clients were destroyed
Diffstat (limited to 'src/conn_info/mod.rs')
-rw-r--r--src/conn_info/mod.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/conn_info/mod.rs b/src/conn_info/mod.rs
index 1981938..183f691 100644
--- a/src/conn_info/mod.rs
+++ b/src/conn_info/mod.rs
@@ -4,7 +4,7 @@ use xcb::{
self, ChangeProperty, ChangeWindowAttributes, CreateWindow, DeleteProperty, DestroyWindow,
Window, WindowClass,
},
- Connection as RawConnection, Cookie,
+ Connection as RawConnection, Cookie, VoidCookieChecked,
};
mod atoms;
@@ -190,6 +190,16 @@ impl<'a> Connection<'a> {
cookie
}
+ /// Delegate for [`RawConnection::send_request_checked`]
+ pub fn send_request_checked<R>(&self, req: &R) -> VoidCookieChecked
+ where
+ R: xcb::RequestWithoutReply + Debug,
+ {
+ let cookie = self.conn.send_request_checked(req);
+ debug_req!(req, cookie);
+ cookie
+ }
+
/// Delegate for [`RawConnection::send_and_check_request`]
pub fn send_and_check_request<R>(&self, req: &R) -> Result<()>
where
@@ -199,6 +209,11 @@ impl<'a> Connection<'a> {
self.conn.send_and_check_request(req).map_err(Into::into)
}
+ /// Delegate for [`RawConnection::check_request`]
+ pub fn check_request(&self, c: VoidCookieChecked) -> Result<()> {
+ self.conn.check_request(c).map_err(Into::into)
+ }
+
/// Delegate for [`RawConnection::flush`]
pub fn flush(&self) -> Result<()> {
self.conn.flush().map_err(Into::into)