diff options
Diffstat (limited to 'src/safe_x11/window.rs')
-rw-r--r-- | src/safe_x11/window.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/safe_x11/window.rs b/src/safe_x11/window.rs index 6d1e54e..eac4dbd 100644 --- a/src/safe_x11/window.rs +++ b/src/safe_x11/window.rs @@ -260,7 +260,7 @@ impl XWindow { .next() { let diff = attrs.width - (*v - attrs.x); if *v - attrs.x > 0 { - let _ = self.resize_to(attrs.width - diff, attrs.height); + self.resize_to(attrs.width - diff, attrs.height); } } } @@ -273,7 +273,7 @@ impl XWindow { .skip_while(|&a| *a <= win_bound) .next() { let new_width = *v - attrs.x; - let _ = self.resize_to(new_width, attrs.height); + self.resize_to(new_width, attrs.height); } } @@ -285,7 +285,7 @@ impl XWindow { .next() { let diff = attrs.height - (*v - attrs.y); if *v - attrs.y > 0 { - let _ = self.resize_to(attrs.width, attrs.height - diff); + self.resize_to(attrs.width, attrs.height - diff); } } } @@ -298,7 +298,7 @@ impl XWindow { .skip_while(|&a| *a <= win_bound) .next() { let new_height = *v - attrs.y; - let _ = self.resize_to(attrs.width, new_height); + self.resize_to(attrs.width, new_height); } } @@ -363,8 +363,8 @@ impl XWindow { let gc = xlib::XCreateGC(self.display, self.inner, 0, ptr::null_mut()); xlib::XSetForeground(self.display, gc, XWhitePixel(self.display, 0)); xlib::XSetBackground(self.display, gc, XBlackPixel(self.display, 0)); - println!("Loading fixed"); - let font: xlib::XFontStruct = ptr::read(xlib::XLoadQueryFont(self.display, CString::new("fixed").unwrap().as_ptr())); + let cstring = CString::new("fixed").unwrap(); + let font: xlib::XFontStruct = ptr::read(xlib::XLoadQueryFont(self.display, cstring.as_ptr())); xlib::XSetFont(self.display, gc, font.fid); xlib::XClearWindow(self.display, self.inner); XDrawString(self.display, self.inner, gc, |