diff --git a/client.c b/client.c index 35fc7968..4f859880 100644 --- a/client.c +++ b/client.c @@ -310,6 +310,8 @@ client_manage(Window w, XWindowAttributes *wa, int screen) Rule *rule; int phys_screen = get_phys_screen(screen); + area = get_screen_area(screen, NULL, NULL); + c = p_new(Client, 1); c->win = w; @@ -337,7 +339,6 @@ client_manage(Window w, XWindowAttributes *wa, int screen) if(!client_loadprops(c, screen)) tag_client_with_rules(c); - area = get_screen_area(screen, NULL, NULL); /* if window request fullscreen mode */ if(c->w == area.width && c->h == area.height) diff --git a/draw.c b/draw.c index 9368125c..251a8e85 100644 --- a/draw.c +++ b/draw.c @@ -245,6 +245,8 @@ draw_get_image_size(const char *filename) surface = cairo_image_surface_create_from_png(filename); cairo_image_surface_get_width(surface); + size.x = 0; + size.y = 0; size.width = cairo_image_surface_get_width(surface); size.height = cairo_image_surface_get_height(surface); cairo_surface_destroy(surface); diff --git a/mouse.c b/mouse.c index 616b04e7..a00cc93a 100644 --- a/mouse.c +++ b/mouse.c @@ -122,11 +122,11 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused))) void uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused))) { - int ocx, ocy, nw, nh, n; + int ocx = 0, ocy = 0, nw, nh, n; XEvent ev; Client *c = globalconf.focus->client; Tag **curtags = get_current_tags(screen); - Area area; + Area area = { 0, 0, 0, 0 }; double mwfact; /* only handle floating and tiled layouts */