diff --git a/hsetroot.c b/hsetroot.c index 90ce65e..e44b743 100644 --- a/hsetroot.c +++ b/hsetroot.c @@ -389,16 +389,19 @@ main(int argc, char **argv) imlib_context_set_color(c.r, c.g, c.b, c.a); imlib_add_color_to_color_range(distance); } else if (strcmp(argv[i], "-gradient") == 0) { - int angle; + double angle; if ((++i) >= argc) { fprintf(stderr, "Missing angle\n"); continue; } - if (sscanf(argv[i], "%i", &angle) == 0) { + if (sscanf(argv[i], "%lf", &angle) == 0) { fprintf (stderr, "Bad angle (%s)\n", argv[i]); continue; } - imlib_image_fill_color_range_rectangle(0, 0, width, height, angle); + for (int j = 0 ; j < noutputs; j++) { + XineramaScreenInfo o = outputs[j]; + imlib_image_fill_color_range_rectangle(o.x_org, o.y_org, o.width, o.height, angle); + } } else if (strcmp(argv[i], "-fill") == 0) { if ((++i) >= argc) { fprintf(stderr, "Missing image\n");