diff -urN fvwm-2.5.27-orig/fvwm/style.c fvwm-2.5.27/fvwm/style.c --- fvwm-2.5.27-orig/fvwm/style.c 2009-02-08 19:59:03 +0900 +++ fvwm-2.5.27/fvwm/style.c 2009-07-08 21:34:07 +0900 @@ -5214,6 +5214,20 @@ fw->border_colors.shadow = fw->colors.shadow; fw->border_colors.back = fw->colors.back; } + /* HACK: Add alpha to the color values if an ARGB visual --AC */ + extern Display *dpy; + FRenderPictFormat *format = FRenderFindVisualFormat(dpy, fw->attr_backup.visual); + if (format != NULL && format->type==PictTypeDirect && + format->direct.alphaMask > 0) + { + fw->colors.fore |= format->direct.alphaMask << format->direct.alpha; + fw->colors.back |= format->direct.alphaMask << format->direct.alpha; + fw->colors.shadow |= format->direct.alphaMask << format->direct.alpha; + fw->colors.hilight |= format->direct.alphaMask << format->direct.alpha; + fw->border_colors.back |= format->direct.alphaMask << format->direct.alpha; + fw->border_colors.shadow |= format->direct.alphaMask << format->direct.alpha; + fw->border_colors.hilight |= format->direct.alphaMask << format->direct.alpha; + } } void update_window_color_hi_style(FvwmWindow *fw, window_style *pstyle) @@ -5268,6 +5282,20 @@ fw->border_hicolors.shadow = fw->hicolors.shadow; fw->border_hicolors.back = fw->hicolors.back; } + /* HACK: Add alpha to the color values if an ARGB visual --AC */ + extern Display *dpy; + FRenderPictFormat *format = FRenderFindVisualFormat(dpy, fw->attr_backup.visual); + if (format != NULL && format->type==PictTypeDirect && + format->direct.alphaMask > 0) + { + fw->hicolors.fore |= format->direct.alphaMask << format->direct.alpha; + fw->hicolors.back |= format->direct.alphaMask << format->direct.alpha; + fw->hicolors.shadow |= format->direct.alphaMask << format->direct.alpha; + fw->hicolors.hilight |= format->direct.alphaMask << format->direct.alpha; + fw->border_hicolors.back |= format->direct.alphaMask << format->direct.alpha; + fw->border_hicolors.shadow |= format->direct.alphaMask << format->direct.alpha; + fw->border_hicolors.hilight |= format->direct.alphaMask << format->direct.alpha; + } } void update_icon_title_cs_style(FvwmWindow *fw, window_style *pstyle)