From 17dd58eeb79c4961a5354d98dc299596636580d6 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 28 May 2019 00:58:18 -0500 Subject: [PATCH] What window? --- examples/cluster.c | 8 ++++---- include/hexagram/window.h | 2 +- src/window.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/cluster.c b/examples/cluster.c index e89bfd7..ca636fb 100644 --- a/examples/cluster.c +++ b/examples/cluster.c @@ -232,7 +232,7 @@ int main(int argc, char **argv) { width = 1024, height = 480; - cairo_t *cr; + cairo_t *fg; if ((can_if = hexagram_can_if_open("vcan0")) == NULL) exit(1); @@ -240,7 +240,7 @@ int main(int argc, char **argv) { if ((window = hexagram_window_new_x11(NULL, width, height)) == NULL) exit(1); - display = window->display; + display = hexagram_window_display(window); fd = hexagram_can_if_fd(can_if); fd2 = hexagram_window_display_fd(window); @@ -255,7 +255,7 @@ int main(int argc, char **argv) { /* * Set up the foreground surface */ - cr = hexagram_window_create_fg_context(window); + fg = hexagram_window_create_fg_context(window); /* * Set up file descriptors to monitor @@ -304,7 +304,7 @@ int main(int argc, char **argv) { if (frame.can_id == 0x280) { hexagram_window_refresh_bg(window); - update_gauge_cluster(cr, &frame, 0, 0, width, height); + update_gauge_cluster(fg, &frame, 0, 0, width, height); hexagram_window_swap_buffer(window); } diff --git a/include/hexagram/window.h b/include/hexagram/window.h index 345051b..1250869 100644 --- a/include/hexagram/window.h +++ b/include/hexagram/window.h @@ -20,7 +20,7 @@ hexagram_window *hexagram_window_new_x11(const char *display, void hexagram_window_destroy(hexagram_window *window); -Display *hexagram_window_get_display(hexagram_window *window); +Display *hexagram_window_display(hexagram_window *window); int hexagram_window_display_fd(hexagram_window *window); diff --git a/src/window.c b/src/window.c index f7c4acf..22b0875 100644 --- a/src/window.c +++ b/src/window.c @@ -166,7 +166,7 @@ void hexagram_window_destroy(hexagram_window *window) { (void)XDestroyWindow(window->display, window->win); } -Display *hexagram_window_get_display(hexagram_window *window) { +Display *hexagram_window_display(hexagram_window *window) { return window->display; }