diff options
Diffstat (limited to 'src/conn_info/mod.rs')
-rw-r--r-- | src/conn_info/mod.rs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/conn_info/mod.rs b/src/conn_info/mod.rs index 7ef6b5a..7bf09ba 100644 --- a/src/conn_info/mod.rs +++ b/src/conn_info/mod.rs @@ -6,7 +6,7 @@ use xcb::{ self, ChangeProperty, ChangeWindowAttributes, CreateWindow, DeleteProperty, DestroyWindow, Window, WindowClass, }, - Connection as RawConnection, Cookie, VoidCookieChecked, + Connection as RawConnection, VoidCookieChecked, }; #[doc(hidden)] @@ -24,7 +24,10 @@ pub use self::{ cursors::Cursors, keys::KeyboardInfo, }; -use crate::error::{Error, Result}; +use crate::{ + debug_req, + error::{Error, Result}, +}; /// The connection, along with some cached resources required for WM operations. pub struct Connection<'a> { @@ -54,18 +57,6 @@ pub struct Connection<'a> { pub keyboard_state: KeyboardInfo, } -/// Helper macro to log a request / cookie when `debug_assertions` are on -macro_rules! debug_req { - ($req:ident) => { - #[cfg(debug_assertions)] - eprintln!("seq ?: {:?}", $req) - }; - ($req:ident, $cookie:ident) => { - #[cfg(debug_assertions)] - eprintln!("seq {}: {:?}", $cookie.sequence(), $req) - }; -} - impl<'a> Connection<'a> { /// Prepare the window manager to run on the given connection and screen number. /// This will fail if another WM is running. |