summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authorIrene Knapp <ireneista@irenes.space>2026-11-11 22:15:21 -0700
committerIrene Knapp <ireneista@irenes.space>2026-11-11 22:15:21 -0700
commitcea4c230b40d5ea2851ed3f97f73b2554849dc34 (patch)
treeb4050e1f499c81df4d9a2fe368c2ebcc7d9e982b /src/main.rs
parent960663d476d8a1391b8bcc4424f3f716147068ab (diff)
moves towards nontrivial drawing
also, a little cleanup of trait consistency

Force-Push: yes
Change-Id: I71e07685d605ec93d98982b3660dcd8d154f8d9d
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(())
   }