diff options
Diffstat (limited to 'comet.c')
| -rw-r--r-- | comet.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -2,9 +2,10 @@ #include <glib.h> #include <glib-unix.h> -#include "x11.h" +#include "window.h" #include "log.h" #include "draw.h" +#include "connection.h" #define EVEN(n) ((int)(n) - ((int)(n) % 2 != 0)) @@ -26,10 +27,13 @@ int main(int argc, char **argv) GMainLoop *mainloop = g_main_loop_new(NULL, FALSE); - Window *win = window_create(); + Connection *con = connection_create(); - int screen_width, screen_height; - window_get_screen_size(win, &screen_width, &screen_height); + Window *win = window_create(con); + + int screen_width = con->screen_size->width; + int screen_height = con->screen_size->height; + log_info("w=%d, h=%d", screen_width, screen_height); int height = EVEN(round(screen_height * 0.021)); int x_padding = EVEN(round(screen_width * 0.005)); |
