Diff
diff --git a/src/bar/bar.rs b/src/bar/bar.rs
index a0c89ee..46f7395 100644
--- a/src/bar/bar.rs
+++ b/src/bar/bar.rs
@@ -65,8 +65,7 @@ impl Bar {
&CreateWindowAux::new()
.background_pixel(config.scheme_normal.background)
.event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS)
- .override_redirect(1)
- .cursor(cursor),
+ .override_redirect(1),
)?;
connection.create_gc(
@@ -77,6 +76,11 @@ impl Bar {
.background(config.scheme_normal.background),
)?;
+ // Set cursor using xlib after window creation
+ unsafe {
+ x11::xlib::XDefineCursor(display, window as u64, cursor as u64);
+ }
+
connection.map_window(window)?;
connection.flush()?;
diff --git a/src/tab_bar.rs b/src/tab_bar.rs
index 9513584..69f8851 100644
--- a/src/tab_bar.rs
+++ b/src/tab_bar.rs
@@ -53,8 +53,7 @@ impl TabBar {
&CreateWindowAux::new()
.background_pixel(scheme_normal.background)
.event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS)
- .override_redirect(1)
- .cursor(cursor),
+ .override_redirect(1),
)?;
connection.create_gc(
@@ -65,6 +64,11 @@ impl TabBar {
.background(scheme_normal.background),
)?;
+ // Set cursor using xlib after window creation
+ unsafe {
+ x11::xlib::XDefineCursor(display, window as u64, cursor as u64);
+ }
+
connection.map_window(window)?;
connection.flush()?;