--- WindowMaker-0.91.0/wrlib/misc.c.vns 2004-10-12 22:21:39 +0400 +++ WindowMaker-0.91.0/wrlib/misc.c 2005-05-19 11:42:54 +0400 @@ -152,7 +152,7 @@ } } else { int bytes = image->width*image->height; - int alpha, nalpha, r, g, b; + int alpha, nalpha, r, g, b, s; alpha = color->alpha; r = color->red * alpha; @@ -160,17 +160,53 @@ b = color->blue * alpha; nalpha = 255 - alpha; - for (i=0; iformat == RRGBAFormat) { - d++; - } + s = (image->format == RRGBAFormat) ? 4 : 3; + + for (i=0; i 255) c=255; + return (unsigned char)c; +} + +void +RLightImage(RImage *image, RColor *color) +{ + unsigned char *d = image->data; + unsigned char *dd; + int alpha, r, g, b, s; + + s = (image->format == RRGBAFormat) ? 4 : 3; + dd = d + s*image->width*image->height; + + r = color->red; + g = color->green; + b = color->blue; + + alpha = color->alpha; + + if (r == 0 && g == 0 && b == 0) { + for (; drcontext, tile, &pixmap)) { wwarning(_("error rendering image:%s"), RMessageForError(RErrorCode)); @@ -597,6 +604,7 @@ } icon->highlighted = flag; + icon->force_paint = True; wIconPaint(icon); } @@ -766,7 +774,7 @@ if (icon->image) { icon->pixmap = makeIcon(scr, icon->image, icon->show_title, - icon->shadowed, icon->tile_type); + icon->shadowed, icon->tile_type, icon->highlighted); } else { /* make default icons */ @@ -794,9 +802,9 @@ image = wIconValidateIconSize(scr, image); scr->def_icon_pixmap = makeIcon(scr, image, False, False, - icon->tile_type); + icon->tile_type, icon->highlighted); scr->def_ticon_pixmap = makeIcon(scr, image, True, False, - icon->tile_type); + icon->tile_type, icon->highlighted); if (image) RReleaseImage(image); } --- WindowMaker-0.91.0/src/appicon.c.vns 2005-05-19 11:42:53 +0400 +++ WindowMaker-0.91.0/src/appicon.c 2005-05-19 11:42:54 +0400 @@ -222,7 +222,7 @@ -#ifdef NEWAPPICON +#if 0 static void drawCorner(WIcon *icon, WWindow *wwin, int active) { --- WindowMaker-0.91.0/src/application.c.vns 2005-05-19 11:42:53 +0400 +++ WindowMaker-0.91.0/src/application.c 2005-05-19 11:42:54 +0400 @@ -465,6 +465,9 @@ XDeleteContext(dpy, wapp->main_window, wAppWinContext); wAppMenuDestroy(wapp->menu); +#ifdef NEWAPPICON + wApplicationDeactivate(wapp); +#endif if (wapp->app_icon) { if (wapp->app_icon->docked && !wapp->app_icon->attracted) { wapp->app_icon->running = 0; --- WindowMaker-0.91.0/src/application.h.vns 2004-10-12 21:53:54 +0400 +++ WindowMaker-0.91.0/src/application.h 2005-05-19 11:47:21 +0400 @@ -60,15 +60,21 @@ #ifdef NEWAPPICON -# define wApplicationActivate(wapp) {\ - wapp->main_window_desc->flags.focused=1; \ - wAppIconPaint(wapp->app_icon);\ - } -#define wApplicationDeactivate(wapp) {\ - wapp->main_window_desc->flags.focused=0;\ - wAppIconPaint(wapp->app_icon);\ - } -#endif +#define wApplicationActivate(wapp) do { \ + if (wapp->app_icon) { \ + wIconSetHighlited(wapp->app_icon->icon, True); \ + wAppIconPaint(wapp->app_icon);\ + } \ + } while (0) + +#define wApplicationDeactivate(wapp) do { \ + if (wapp->app_icon) { \ + wIconSetHighlited(wapp->app_icon->icon, False); \ + wAppIconPaint(wapp->app_icon);\ + } \ + } while (0) + #endif +#endif