summaryrefslogtreecommitdiff
path: root/src/cursors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cursors.rs')
-rw-r--r--src/cursors.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cursors.rs b/src/cursors.rs
index 2cb8f0e..3153288 100644
--- a/src/cursors.rs
+++ b/src/cursors.rs
@@ -7,8 +7,10 @@ use xcb::{
// https://tronche.com/gui/x/xlib/appendix/b/
const XC_LEFT_PTR: u16 = 68;
+/// Caches X11 cursor objects
#[derive(Debug)]
pub struct Cursors {
+ #[allow(unused)] // Needs to be kept around since the cursors depend on it
font: Font,
pub normal: Cursor,
@@ -16,6 +18,7 @@ pub struct Cursors {
}
impl Cursors {
+ /// Load default cursors using the given connection.
pub fn new_with(conn: &Connection) -> Result<Self> {
// Open cursor font
let font = conn.generate_id();