Use regular X11 rather than XFIXES to hide cursor

The semantics of the XFIXES cursor hide deal are annoying and make
things harder.
This commit is contained in:
2022-05-27 18:05:55 -07:00
parent 344907f55a
commit a516a25a9f
2 changed files with 62 additions and 18 deletions

View File

@ -32,6 +32,20 @@ pub fn create_atom(conn: &xcb::Connection, name: &[u8]) -> xcb::Result<x::Atom>
Ok(conn.wait_for_reply(cookie)?.atom())
}
pub fn destroy_pixmap(conn: &xcb::Connection, pixmap: x::Pixmap) -> xcb::Result<()> {
conn.send_and_check_request(&x::FreePixmap {
pixmap,
})?;
Ok(())
}
pub fn destroy_cursor(conn: &xcb::Connection, cursor: x::Cursor) -> xcb::Result<()> {
conn.send_and_check_request(&x::FreeCursor {
cursor,
})?;
Ok(())
}
pub fn destroy_gc(conn: &xcb::Connection, gc: x::Gcontext) -> xcb::Result<()> {
conn.send_and_check_request(&x::FreeGc {
gc,