Diff
diff --git a/src/bar/bar.rs b/src/bar/bar.rs
index 46f7395..9f74896 100644
--- a/src/bar/bar.rs
+++ b/src/bar/bar.rs
@@ -76,7 +76,6 @@ 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);
}
@@ -266,7 +265,12 @@ impl Bar {
let underline_x = x_position + (underline_padding / 2) as i16;
unsafe {
- let gc = x11::xlib::XCreateGC(display, self.surface.pixmap(), 0, std::ptr::null_mut());
+ let gc = x11::xlib::XCreateGC(
+ display,
+ self.surface.pixmap(),
+ 0,
+ std::ptr::null_mut(),
+ );
x11::xlib::XSetForeground(display, gc, scheme.underline as u64);
x11::xlib::XFillRectangle(
display,
@@ -327,9 +331,13 @@ impl Bar {
let top_padding = 4;
let text_y = top_padding + font.ascent();
- self.surface
- .font_draw()
- .draw_text(font, block.color(), x_position, text_y, &text);
+ self.surface.font_draw().draw_text(
+ font,
+ block.color(),
+ x_position,
+ text_y,
+ &text,
+ );
if self.block_underlines[i] {
let font_height = font.height();
@@ -342,8 +350,12 @@ impl Bar {
let underline_x = x_position - (underline_padding / 2) as i16;
unsafe {
- let gc =
- x11::xlib::XCreateGC(display, self.surface.pixmap(), 0, std::ptr::null_mut());
+ let gc = x11::xlib::XCreateGC(
+ display,
+ self.surface.pixmap(),
+ 0,
+ std::ptr::null_mut(),
+ );
x11::xlib::XSetForeground(display, gc, block.color() as u64);
x11::xlib::XFillRectangle(
display,
diff --git a/src/tab_bar.rs b/src/tab_bar.rs
index 69f8851..a9835da 100644
--- a/src/tab_bar.rs
+++ b/src/tab_bar.rs
@@ -64,7 +64,6 @@ impl TabBar {
.background(scheme_normal.background),
)?;
- // Set cursor using xlib after window creation
unsafe {
x11::xlib::XDefineCursor(display, window as u64, cursor as u64);
}
@@ -116,7 +115,8 @@ impl TabBar {
connection.flush()?;
unsafe {
- let gc = x11::xlib::XCreateGC(self.display, self.surface.pixmap(), 0, std::ptr::null_mut());
+ let gc =
+ x11::xlib::XCreateGC(self.display, self.surface.pixmap(), 0, std::ptr::null_mut());
x11::xlib::XSetForeground(self.display, gc, self.scheme_normal.background as u64);
x11::xlib::XFillRectangle(
self.display,
@@ -158,17 +158,25 @@ impl TabBar {
let top_padding = 6;
let text_y = top_padding + font.ascent();
- self.surface
- .font_draw()
- .draw_text(font, scheme.foreground, text_x, text_y, &display_title);
+ self.surface.font_draw().draw_text(
+ font,
+ scheme.foreground,
+ text_x,
+ text_y,
+ &display_title,
+ );
if is_focused {
let underline_height = 3;
let underline_y = self.height as i16 - underline_height;
unsafe {
- let gc =
- x11::xlib::XCreateGC(self.display, self.surface.pixmap(), 0, std::ptr::null_mut());
+ let gc = x11::xlib::XCreateGC(
+ self.display,
+ self.surface.pixmap(),
+ 0,
+ std::ptr::null_mut(),
+ );
x11::xlib::XSetForeground(self.display, gc, scheme.underline as u64);
x11::xlib::XFillRectangle(
self.display,