summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main.rs b/src/main.rs
index 51cb7bf..5ad82a4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -206,20 +206,19 @@ impl Dock {
     println!("redraw");
 
     let drawable = Drawable::Window(self.window_id());
-    let _context = GraphicContext::new(Arc::clone(self.display()),
-				       drawable);
+    let context = GraphicContext::new(
+	              Arc::clone(self.display()), drawable)?;
 
-    /*
     let black = self.screen().black_pixel();
 
-    let cookie = connection.send_request_checked(&PolyFillRectangle {
-      drawable: Drawable::Window(self.window_id()),
-      property: *property,
-      r#type: xcb::x::ATOM_CARDINAL,
-      data: values,
+    let cookie = self.send_request_checked(&PolyFillRectangle {
+      drawable: drawable,
+      gc: context.graphic_context_id(),
+      rectangles: &[xcb::x::Rectangle {
+	x: 0, y: 0, width: 25, height: 25
+      }],
     });
-    connection.check_request(cookie)?;
-    */
+    self.check_request(cookie)?;
 
     Ok(())
   }