tony / oxwm

Fixed no cursor issue Browse files
tonybanters committed 2026-01-15 parent 2a70554 commit fc65b0e94326fae84f4573087080f31d6047e1b9
Showing 3 changed files with 8 additions and 2 deletions. UnifiedSplit
+3 −1 src/bar/bar.rs
@@ -44,6 +44,7 @@ impl Bar {
44 x: i16, 44 x: i16,
45 y: i16, 45 y: i16,
46 width: u16, 46 width: u16,
47 + cursor: u32,
47 ) -> Result<Self, X11Error> { 48 ) -> Result<Self, X11Error> {
48 let window = connection.generate_id()?; 49 let window = connection.generate_id()?;
49 let graphics_context = connection.generate_id()?; 50 let graphics_context = connection.generate_id()?;
@@ -64,7 +65,8 @@ impl Bar {
64 &CreateWindowAux::new() 65 &CreateWindowAux::new()
65 .background_pixel(config.scheme_normal.background) 66 .background_pixel(config.scheme_normal.background)
66 .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS) 67 .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS)
67 - .override_redirect(1), 68 + .override_redirect(1)
69 + .cursor(cursor),
68 )?; 70 )?;
69 71
70 connection.create_gc( 72 connection.create_gc(
+3 −1 src/tab_bar.rs
@@ -32,6 +32,7 @@ impl TabBar {
32 width: u16, 32 width: u16,
33 scheme_normal: ColorScheme, 33 scheme_normal: ColorScheme,
34 scheme_selected: ColorScheme, 34 scheme_selected: ColorScheme,
35 + cursor: u32,
35 ) -> Result<Self, X11Error> { 36 ) -> Result<Self, X11Error> {
36 let window = connection.generate_id()?; 37 let window = connection.generate_id()?;
37 let graphics_context = connection.generate_id()?; 38 let graphics_context = connection.generate_id()?;
@@ -52,7 +53,8 @@ impl TabBar {
52 &CreateWindowAux::new() 53 &CreateWindowAux::new()
53 .background_pixel(scheme_normal.background) 54 .background_pixel(scheme_normal.background)
54 .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS) 55 .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS)
55 - .override_redirect(1), 56 + .override_redirect(1)
57 + .cursor(cursor),
56 )?; 58 )?;
57 59
58 connection.create_gc( 60 connection.create_gc(
+2 −0 src/window_manager.rs
@@ -270,6 +270,7 @@ impl WindowManager {
270 monitor.screen_x as i16, 270 monitor.screen_x as i16,
271 monitor.screen_y as i16, 271 monitor.screen_y as i16,
272 monitor.screen_width as u16, 272 monitor.screen_width as u16,
273 + normal_cursor,
273 )?; 274 )?;
274 bars.push(bar); 275 bars.push(bar);
275 } 276 }
@@ -290,6 +291,7 @@ impl WindowManager {
290 .saturating_sub(2 * config.gap_outer_horizontal as i32) as u16, 291 .saturating_sub(2 * config.gap_outer_horizontal as i32) as u16,
291 config.scheme_occupied, 292 config.scheme_occupied,
292 config.scheme_selected, 293 config.scheme_selected,
294 + normal_cursor,
293 )?; 295 )?;
294 tab_bars.push(tab_bar); 296 tab_bars.push(tab_bar);
295 } 297 }