diff options
author | tcmal <me@aria.rip> | 2024-08-13 17:56:39 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-13 21:48:11 +0100 |
commit | e4d9484d0e1ebcf496d0606800560c09d2753df4 (patch) | |
tree | 23931a1cba89ca75e592c7351022bf7b22c487a8 /src/conn_info | |
parent | d973959f7f34e02eeb01766b01aff680639a8c4c (diff) |
Add moving and resizing with mouse
Diffstat (limited to 'src/conn_info')
-rw-r--r-- | src/conn_info/cursors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conn_info/cursors.rs b/src/conn_info/cursors.rs index bb547e4..c564f56 100644 --- a/src/conn_info/cursors.rs +++ b/src/conn_info/cursors.rs @@ -6,6 +6,7 @@ use xcb::{ // https://tronche.com/gui/x/xlib/appendix/b/ const XC_LEFT_PTR: u16 = 68; +const XC_FLEUR: u16 = 52; /// Caches X11 cursor objects #[derive(Debug)] @@ -14,6 +15,7 @@ pub struct Cursors { font: Font, normal: Cursor, + moving: Cursor, } impl Cursors { @@ -28,6 +30,7 @@ impl Cursors { Ok(Self { normal: Self::load_cursor(conn, font, XC_LEFT_PTR)?, + moving: Self::load_cursor(conn, font, XC_FLEUR)?, font, }) } @@ -57,6 +60,10 @@ impl Cursors { self.normal } + pub const fn moving(&self) -> Cursor { + self.moving + } + /// Free the associated resources to avoid leaking them. /// This object must not be used again after this method is called, as all resources will be invalid. pub unsafe fn free(&self, conn: &RawConnection) { |