My The Cheat wants to know what your crappy toy is this week.

This commit is contained in:
XANTRONIX Development 2019-05-28 00:25:16 -05:00
parent 1dc9a1c90d
commit b14146606d
2 changed files with 12 additions and 12 deletions

View file

@ -15,8 +15,8 @@
typedef struct _hexagram_window hexagram_window; typedef struct _hexagram_window hexagram_window;
hexagram_window *hexagram_window_new_x11(const char *display, hexagram_window *hexagram_window_new_x11(const char *display,
unsigned int width, int width,
unsigned int height); int height);
void hexagram_window_destroy(hexagram_window *window); void hexagram_window_destroy(hexagram_window *window);

View file

@ -10,10 +10,8 @@
struct _hexagram_window { struct _hexagram_window {
Display *display; Display *display;
int screen; int screen,
width, height;
unsigned int width,
height;
Window root, Window root,
win; win;
@ -33,8 +31,8 @@ struct _hexagram_window {
}; };
hexagram_window *hexagram_window_new_x11(const char *display, hexagram_window *hexagram_window_new_x11(const char *display,
unsigned int width, int width,
unsigned int height) { int height) {
hexagram_window *window; hexagram_window *window;
int major, minor; int major, minor;
@ -42,6 +40,9 @@ hexagram_window *hexagram_window_new_x11(const char *display,
goto error_malloc_window; goto error_malloc_window;
} }
window->width = width;
window->height = height;
/* /*
* Connect to the X display * 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, cairo_xlib_surface_set_size(window->surface_bg,
window->width, width, height);
window->height);
if ((window->surface_fg = cairo_xlib_surface_create(window->display, if ((window->surface_fg = cairo_xlib_surface_create(window->display,
window->buf, window->buf,
@ -118,8 +118,8 @@ hexagram_window *hexagram_window_new_x11(const char *display,
} }
cairo_xlib_surface_set_size(window->surface_fg, cairo_xlib_surface_set_size(window->surface_fg,
window->width, width,
window->height); height);
return window; return window;