about summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
authorStacy Harper <contact@stacyharper.net>2021-08-25 22:06:51 +0200
committerJohn Sullivan <jsullivan@csumb.edu>2021-10-19 23:12:01 -0700
commitf2f638fd34a22d29bd3a5f7cb25f25c01c29c76f (patch)
tree975ba1b96f6c94303525b4075daa294882748fe6 /main.c
parent4ef8af17ee62f4e99f8d71ccfec5f264f5851db9 (diff)
downloadsuggpicker-f2f638fd34a22d29bd3a5f7cb25f25c01c29c76f.tar.gz
Simplify ctx initializer
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index 9805a7a..3aa49d8 100644
--- a/main.c
+++ b/main.c
@@ -438,8 +438,11 @@ main(int argc, char **argv) {
 
 	/* create surface */
 	wl_surface = wl_compositor_create_surface(compositor);
-	drw_init(&draw_ctx, fc_font_pattern, shm);
-	drwsurf_init(&draw_ctx, &draw_surf, wl_surface);
+
+	draw_ctx.shm = shm;
+	draw_ctx.font_description = pango_font_description_from_string(fc_font_pattern);
+	draw_surf.ctx = &draw_ctx;
+	draw_surf.surf = wl_surface;
 
 	layer_surface = zwlr_layer_shell_v1_get_layer_surface(
 	  layer_shell, draw_surf.surf, wl_output, layer, namespace);