diff --git a/ChangeLog b/ChangeLog index 1a5f60a..5b370a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4956,3 +4956,7 @@ Thu Jan 2 14:54:45 2003 Michael Jennings (mej) Spec file update. ---------------------------------------------------------------------- +Wed Jan 8 01:16:29 2003 Michael Jennings (mej) + +Fixed a bug with non-bordered icons being rendered at 0 size. +---------------------------------------------------------------------- diff --git a/src/buttons.c b/src/buttons.c index 4d9ad6d..cc29d27 100644 --- a/src/buttons.c +++ b/src/buttons.c @@ -554,10 +554,12 @@ button_calc_size(buttonbar_t *bbar, button_t *button) } #ifdef PIXMAP_SUPPORT if (button->icon) { - unsigned short b = 0; + unsigned short b; if (bord) { b = button->h - bord->top - bord->bottom; + } else { + b = button->h; } imlib_context_set_image(button->icon->iml->im); button->icon_w = imlib_image_get_width(); diff --git a/src/pixmap.c b/src/pixmap.c index cf89eb2..33135ea 100644 --- a/src/pixmap.c +++ b/src/pixmap.c @@ -788,8 +788,12 @@ paste_simage(simage_t *simg, unsigned char which, Window win, Drawable d, unsign GC gc; ASSERT(simg != NULL); - REQUIRE(d != None); D_PIXMAP(("paste_simage(%8p, %s, 0x%08x, 0x%08x, %hd, %hd, %hd, %hd) called.\n", simg, get_image_type(which), (int) win, (int) d, x, y, w, h)); + + REQUIRE(d != None); + REQUIRE(w > 0); + REQUIRE(h > 0); + if (which != image_max) { if (image_mode_is(which, MODE_AUTO) && image_mode_is(which, ALLOW_AUTO)) { char buff[255], *reply;