asdf
Browse files
+6 −2 src/bar/bar.rs
| @@ -65,8 +65,7 @@ impl Bar { | |||
| 65 | &CreateWindowAux::new() | 65 | &CreateWindowAux::new() |
| 66 | .background_pixel(config.scheme_normal.background) | 66 | .background_pixel(config.scheme_normal.background) |
| 67 | .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS) | 67 | .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS) |
| 68 | - .override_redirect(1) | 68 | + .override_redirect(1), |
| 69 | - .cursor(cursor), | ||
| 70 | )?; | 69 | )?; |
| 71 | 70 | ||
| 72 | connection.create_gc( | 71 | connection.create_gc( |
| @@ -77,6 +76,11 @@ impl Bar { | |||
| 77 | .background(config.scheme_normal.background), | 76 | .background(config.scheme_normal.background), |
| 78 | )?; | 77 | )?; |
| 79 | 78 | ||
| 79 | + // Set cursor using xlib after window creation | ||
| 80 | + unsafe { | ||
| 81 | + x11::xlib::XDefineCursor(display, window as u64, cursor as u64); | ||
| 82 | + } | ||
| 83 | + | ||
| 80 | connection.map_window(window)?; | 84 | connection.map_window(window)?; |
| 81 | connection.flush()?; | 85 | connection.flush()?; |
| 82 | 86 | ||
+6 −2 src/tab_bar.rs
| @@ -53,8 +53,7 @@ impl TabBar { | |||
| 53 | &CreateWindowAux::new() | 53 | &CreateWindowAux::new() |
| 54 | .background_pixel(scheme_normal.background) | 54 | .background_pixel(scheme_normal.background) |
| 55 | .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS) | 55 | .event_mask(EventMask::EXPOSURE | EventMask::BUTTON_PRESS) |
| 56 | - .override_redirect(1) | 56 | + .override_redirect(1), |
| 57 | - .cursor(cursor), | ||
| 58 | )?; | 57 | )?; |
| 59 | 58 | ||
| 60 | connection.create_gc( | 59 | connection.create_gc( |
| @@ -65,6 +64,11 @@ impl TabBar { | |||
| 65 | .background(scheme_normal.background), | 64 | .background(scheme_normal.background), |
| 66 | )?; | 65 | )?; |
| 67 | 66 | ||
| 67 | + // Set cursor using xlib after window creation | ||
| 68 | + unsafe { | ||
| 69 | + x11::xlib::XDefineCursor(display, window as u64, cursor as u64); | ||
| 70 | + } | ||
| 71 | + | ||
| 68 | connection.map_window(window)?; | 72 | connection.map_window(window)?; |
| 69 | connection.flush()?; | 73 | connection.flush()?; |
| 70 | 74 | ||