From b14146606da0eb69cd996e4e7e504d3b6dfee5a0 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 28 May 2019 00:25:16 -0500 Subject: [PATCH] My The Cheat wants to know what your crappy toy is this week. --- include/hexagram/window.h | 4 ++-- src/window.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/hexagram/window.h b/include/hexagram/window.h index df13bf2..65f5b1c 100644 --- a/include/hexagram/window.h +++ b/include/hexagram/window.h @@ -15,8 +15,8 @@ typedef struct _hexagram_window hexagram_window; hexagram_window *hexagram_window_new_x11(const char *display, - unsigned int width, - unsigned int height); + int width, + int height); void hexagram_window_destroy(hexagram_window *window); diff --git a/src/window.c b/src/window.c index 53b7e12..04b8cd4 100644 --- a/src/window.c +++ b/src/window.c @@ -10,10 +10,8 @@ struct _hexagram_window { Display *display; - int screen; - - unsigned int width, - height; + int screen, + width, height; Window root, win; @@ -33,8 +31,8 @@ struct _hexagram_window { }; hexagram_window *hexagram_window_new_x11(const char *display, - unsigned int width, - unsigned int height) { + int width, + int height) { hexagram_window *window; int major, minor; @@ -42,6 +40,9 @@ hexagram_window *hexagram_window_new_x11(const char *display, goto error_malloc_window; } + window->width = width; + window->height = height; + /* * Connect to the X display */ @@ -105,8 +106,7 @@ hexagram_window *hexagram_window_new_x11(const char *display, } cairo_xlib_surface_set_size(window->surface_bg, - window->width, - window->height); + width, height); if ((window->surface_fg = cairo_xlib_surface_create(window->display, window->buf, @@ -118,8 +118,8 @@ hexagram_window *hexagram_window_new_x11(const char *display, } cairo_xlib_surface_set_size(window->surface_fg, - window->width, - window->height); + width, + height); return window;